Page 1 of 1
Constant already defined - 1.0-svn installation
Posted: Thu Aug 31, 2006 9:15 pm
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
Re: Constant already defined - 1.0-svn installation
Posted: Thu Aug 31, 2006 11:02 pm
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');
Re: Constant already defined - 1.0-svn installation
Posted: Fri Nov 09, 2007 4:51 am
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.
Re: Constant already defined - 1.0-svn installation
Posted: Fri Nov 30, 2007 4:00 pm
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.