Page 1 of 1

[Solved]Warning Message: Line 129 in Index.php

Posted: Mon Sep 08, 2008 4:03 am
by sparquay
The Problem
My Home page loads fine, but hitting a Childpage link or a News Title link produces this error at the top of the page...
Warning: preg_match() [function.preg-match]: Unknown modifier '\' in /home/rosehill/www/www/youth/index.php on line 129

I went to that line of code and it says...

Code: Select all

if (preg_match($route->regex, $page, $matches))
in context the code is...

Code: Select all

//See if our page matches any predefined routes
$page = rtrim($page, '/');
if (strpos($page, '/') !== FALSE)
{
	$routes =& $gCms->variables['routes'];
	
	$matched = false;
	foreach ($routes as $route)
	{
		$matches = array();
		if (preg_match($route->regex, $page, $matches))
		{
			//Now setup some assumptions
			if (!isset($matches['id']))
				$matches['id'] = 'cntnt01';
			if (!isset($matches['action']))
				$matches['action'] = 'defaulturl';
			if (!isset($matches['inline']))
				$matches['inline'] = 0;
			if (!isset($matches['returnid']))
				$matches['returnid'] = ''; #Look for default page
			if (!isset($matches['module']))
				$matches['module'] = $route->module;
Any clues how to get rid of the Warning? Did I accidentally erase something in the Home page that needs to be there for Parent Pages/Child Pages?

I'm very new to this CMS program, I just installed it Sat Night, and have been trying to tweak things to my liking. I am completely new to PHP and Javascript languages, so you'll have to dumb it down for me quite a bit.

My Information
The Website
----------------------------------------------

Cms Version: 1.4.1

Installed Modules:

    * CMSMailer: 1.73.14
    * FileManager: 0.4.1
    * MenuManager: 1.5.1
    * ModuleManager: 1.2.1
    * News: 2.8.2
    * nuSOAP: 1.0.1
    * Printing: 0.2.5
    * Search: 1.5.1
    * ThemeManager: 1.0.8
    * TinyMCE: 2.4.5
    * Album: 0.9.3
    * Forum: 0.9.0
    * FrontEndUsers: 1.5.2
    * Calendar: 0.8.2
    * Lytebox: 0.2.1beta1


Config Information:

    * php_memory_limit:
    * process_whole_template: true
    * max_upload_size: 20000000
    * default_upload_permission: 664
    * assume_mod_rewrite: false
    * page_extension:
    * internal_pretty_urls: true
    * use_hierarchy: true


Php Information:

    * safe_mode: Off (False)
    * phpversion: 5.2.6
    * memory_limit: 80M
    * max_execution_time: 120
    * gd_version: 2
    * session_save_path: /tmp (1773)


Server Information:

    * Server Api: cgi
    * Server Db Type: MySQL (mysql)
    * Server Db Version: 5.0.45


----------------------------------------------

Re: Warning Message: Line 129 in Index.php

Posted: Mon Sep 08, 2008 10:04 am
by rvdv

Re: Warning Message: Line 129 in Index.php

Posted: Mon Sep 08, 2008 4:31 pm
by sparquay
Cheers mate! That fixed it right up.

Re: Warning Message: Line 129 in Index.php

Posted: Mon Sep 08, 2008 6:00 pm
by alby
sparquay wrote: Cheers mate! That fixed it right up.
Please mark [SOLVED] the title of first post

Alby

Re: [Solved]Warning Message: Line 129 in Index.php

Posted: Mon Sep 08, 2008 6:14 pm
by sparquay
Thanks, I'm quite new to the forum...