Use of undefined constant _DEBUG, a forum discussion on Jojo CMS. Join us for more discussions on Use of undefined constant _DEBUG on our Installation forum.
You must be logged in to post a reply
| |
az
10th April
Posts: 2
was installing without major problem so far... but once I want to click on "Start Installation" in STEP 4, it does nothing (just reload the same page)...
Only clue I have, is this error message in the Apache log (2.2.8/PHP 5.2.5):
[Wed Apr 09 17:00:57 2008][error][client <ip>] PHP Notice: Use of undefined constant _DEBUG - assumed '_DEBUG' in <windows path to>htdocs\\jojo\\classes\\JOJO.php on line 24, referer: http://<mysite installation>/setup
Looking at the line 24:
/* Register the jojo php error hanlder */
if (!_DEBUG) {
set_error_handler(array('Jojo', 'errorHandler'), E_ALL);
}
-> doesn't seems to be the problem (NB. even if I comment the line, it fails).
Any idea of what the problem could be ?
[EDIT] the config.php is there and has been created in the root of webserver.
NB. It stops after:
/* Master password */
define('_MASTERPASS', '********');
and php tag isn't closed...
Only clue I have, is this error message in the Apache log (2.2.8/PHP 5.2.5):
[Wed Apr 09 17:00:57 2008][error][client <ip>] PHP Notice: Use of undefined constant _DEBUG - assumed '_DEBUG' in <windows path to>htdocs\\jojo\\classes\\JOJO.php on line 24, referer: http://<mysite installation>/setup
Looking at the line 24:
/* Register the jojo php error hanlder */
if (!_DEBUG) {
set_error_handler(array('Jojo', 'errorHandler'), E_ALL);
}
-> doesn't seems to be the problem (NB. even if I comment the line, it fails).
Any idea of what the problem could be ?
[EDIT] the config.php is there and has been created in the root of webserver.
NB. It stops after:
/* Master password */
define('_MASTERPASS', '********');
and php tag isn't closed...
Hi Az,
The lack of closing ?> tag is there deliberately - none of the Jojo files have one, and the advantage is you don't need to worry about whitespace being included after your closing PHP tag (unwanted whitespace is responsible for many hours of wasted productivity).
Config should finish after _MASTERPASS is defined, that's normal. Make sure _DEBUG is defined in the config file, but I'm sure Jojo defaults it to false anyway.
The "Start installation" button should send you to www.domain.com/setup/ which will ask for your master password, then display a number of messages.
If you can run www.domain.com/setup/ in a browser but get PHP errors, please let us know what those are and we can help further. If you get a 404 or Apache error on www.domain.com/setup/ then it's possible the mod_rewrite setup isn't quite right, or an error in .htaccess
Let us know what result you get from the setup script, and also what version of Jojo you are running.
Harvey.
The lack of closing ?> tag is there deliberately - none of the Jojo files have one, and the advantage is you don't need to worry about whitespace being included after your closing PHP tag (unwanted whitespace is responsible for many hours of wasted productivity).
Config should finish after _MASTERPASS is defined, that's normal. Make sure _DEBUG is defined in the config file, but I'm sure Jojo defaults it to false anyway.
The "Start installation" button should send you to www.domain.com/setup/ which will ask for your master password, then display a number of messages.
If you can run www.domain.com/setup/ in a browser but get PHP errors, please let us know what those are and we can help further. If you get a 404 or Apache error on www.domain.com/setup/ then it's possible the mod_rewrite setup isn't quite right, or an error in .htaccess
Let us know what result you get from the setup script, and also what version of Jojo you are running.
Harvey.
az
10th April
Posts: 2
Hi Harvey,
Thanks for answer... indeed _DEBUG is defined in config.php which directly pointed me in the right direction (just did a copy of config.php in mysite and then it was complaining about tables, of course, not created yet).
my current setup involves that all directories are in the root of the webservers, and (my bad :) I missinterpreted the "web directory" in step 3.
-> reran setup
[Old and non working config]
web dir: <windows path to>htdocs\\
base dir: <windows path to>htdocs\\jojo
mysite dir: <windows path to>htdocs\\mysite
[Current working config]
web dir: <windows path to>htdocs\\mysite
base dir: <windows path to>htdocs\\jojo
mysite dir: <windows path to>htdocs\\mysite
and now everything is working fine (well so far ;) !
Thanks again... I'll post feedback in a few days...
[EDIT] Already back!
I encountered this problem while jojo was creating table:
INSERT INTO eventlog SET el_datetime=NOW(), el_code = 'PHP Error', el_shortdesc = '<windows path to>\\htdocs\\jojo\\classes\\JOJO.php \"file_get_contents(<windows path to>/htdocs/mysite/cache/listPlugins.txt) [function.file-get-contents]: failed to open stream: No such file or directory\" line 215', el_desc = 'Error No: 2\nDescription: file_get_contents(<windows path to>/htdocs/mysite/cache/listPlugins.txt) [function.file-get-contents]: failed to open stream: No such file or directory\nFile: <windows path to>\\htdocs\\jojo\\classes\\JOJO.php\nLine: 215\n', el_importance = 'high', el_userid = '0', el_username = '', el_ip = '<client ip>', el_uri = '', el_referer = 'http://<server>/mysite/setup', el_browser = 'Firefox 2.0' Data too long for column 'el_shortdesc' at row 1
INSERT INTO eventlog SET el_datetime=NOW(), el_code = 'PHP Error', el_shortdesc = '<windows path to>\\htdocs\\jojo\\classes\\JOJO.php \"file_get_contents(<windows path to>/htdocs/mysite/cache/listThemes.txt) [function.file-get-contents]: failed to open stream: No such file or directory\" line 280', el_desc = 'Error No: 2\nDescription: file_get_contents(<windows path to>/htdocs/mysite/cache/listThemes.txt) [function.file-get-contents]: failed to open stream: No such file or directory\nFile: <windows path to>\\htdocs\\jojo\\classes\\JOJO.php\nLine: 280\n', el_importance = 'high', el_userid = '0', el_username = '', el_ip = '<client ip>', el_uri = 'mysite', el_referer = '', el_browser = 'Firefox 2.0' Data too long for column 'el_shortdesc' at row 1
Well not a drama, placing empty files of that name (listPlugins.txt and listThemes.txt) in the searched path solved the problem... but maybe adding a check to see if those file exists, prior to reading them would be nice.
NB. jojo, filled those files once manually created.
[EDIT 2] Another suggestion (even if it's probably under dev), a search in the forum would be nice too :)
Thanks for answer... indeed _DEBUG is defined in config.php which directly pointed me in the right direction (just did a copy of config.php in mysite and then it was complaining about tables, of course, not created yet).
my current setup involves that all directories are in the root of the webservers, and (my bad :) I missinterpreted the "web directory" in step 3.
-> reran setup
[Old and non working config]
web dir: <windows path to>htdocs\\
base dir: <windows path to>htdocs\\jojo
mysite dir: <windows path to>htdocs\\mysite
[Current working config]
web dir: <windows path to>htdocs\\mysite
base dir: <windows path to>htdocs\\jojo
mysite dir: <windows path to>htdocs\\mysite
and now everything is working fine (well so far ;) !
Thanks again... I'll post feedback in a few days...
[EDIT] Already back!
I encountered this problem while jojo was creating table:
INSERT INTO eventlog SET el_datetime=NOW(), el_code = 'PHP Error', el_shortdesc = '<windows path to>\\htdocs\\jojo\\classes\\JOJO.php \"file_get_contents(<windows path to>/htdocs/mysite/cache/listPlugins.txt) [function.file-get-contents]: failed to open stream: No such file or directory\" line 215', el_desc = 'Error No: 2\nDescription: file_get_contents(<windows path to>/htdocs/mysite/cache/listPlugins.txt) [function.file-get-contents]: failed to open stream: No such file or directory\nFile: <windows path to>\\htdocs\\jojo\\classes\\JOJO.php\nLine: 215\n', el_importance = 'high', el_userid = '0', el_username = '', el_ip = '<client ip>', el_uri = '', el_referer = 'http://<server>/mysite/setup', el_browser = 'Firefox 2.0' Data too long for column 'el_shortdesc' at row 1
INSERT INTO eventlog SET el_datetime=NOW(), el_code = 'PHP Error', el_shortdesc = '<windows path to>\\htdocs\\jojo\\classes\\JOJO.php \"file_get_contents(<windows path to>/htdocs/mysite/cache/listThemes.txt) [function.file-get-contents]: failed to open stream: No such file or directory\" line 280', el_desc = 'Error No: 2\nDescription: file_get_contents(<windows path to>/htdocs/mysite/cache/listThemes.txt) [function.file-get-contents]: failed to open stream: No such file or directory\nFile: <windows path to>\\htdocs\\jojo\\classes\\JOJO.php\nLine: 280\n', el_importance = 'high', el_userid = '0', el_username = '', el_ip = '<client ip>', el_uri = 'mysite', el_referer = '', el_browser = 'Firefox 2.0' Data too long for column 'el_shortdesc' at row 1
Well not a drama, placing empty files of that name (listPlugins.txt and listThemes.txt) in the searched path solved the problem... but maybe adding a check to see if those file exists, prior to reading them would be nice.
NB. jojo, filled those files once manually created.
[EDIT 2] Another suggestion (even if it's probably under dev), a search in the forum would be nice too :)
| Back to Forum Index : Back to Installation |
|
