Constant already defined - 1.0-svn installation

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
alby

Constant already defined - 1.0-svn installation

Post by alby »

A fresh installation of 1.0-svn with WinXP and PHP 4.4.4:

Notice: Constant CONFIG_FILE_LOCATION already defined in D:\httpd\XXXXX\www\fileloc.php on line 2
Notice: Constant TMP_CACHE_LOCATION already defined in D:\httpd\XXXXX\www\fileloc.php on line 3
Notice: Constant TMP_TEMPLATES_C_LOCATION already defined in D:\httpd\XXXXX\www\fileloc.php on line 4

Alby
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Constant already defined - 1.0-svn installation

Post by Dee »

This is during install or after install?
Assuming this happens during install (that's the only place I can find a require or include fileloc.php), try changing

Code: Select all

require(dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'fileloc.php');
on line 149 of install/install.php to

Code: Select all

require_once(dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'fileloc.php');
didier.bertrand

Re: Constant already defined - 1.0-svn installation

Post by didier.bertrand »

I just had the problem, and the proposed solution did not work.
The problem seems to be not specific to CMSMS (just search on the net for: php "already defined in")
In fact I got the problem two months after the installation of CMSMS when I activated the PHP extension "threads".
So if it is your case, just disable this extension and the problem will be cleared.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Constant already defined - 1.0-svn installation

Post by Dee »

didier.bertrand wrote: I just had the problem, and the proposed solution did not work.
The "already defined in" message is very general and occurs when a constant is re-defined in PHP.
Please post the exact error message(s)/notices you're getting, including the constant name, filename and line number.
Also please mention the version of CMSMS you're using.
Locked

Return to “[locked] Installation, Setup and Upgrade”