Technaut Posted April 16, 2009 Share Posted April 16, 2009 Hi, I'm trying to install kissa.be on a server and I'm having problems with some undefined constants:- here are the error messages:- Notice: Use of undefined constant PROJECT_DIR - assumed 'PROJECT_DIR' in E:\domains\0\example.com\user\htdocs\config.php on line 9 Notice: Use of undefined constant LOCALE_DIR - assumed 'LOCALE_DIR' in E:\domains\0\example.com\user\htdocs\config.php on line 11 Notice: Use of undefined constant DEFAULT_LOCALE - assumed 'DEFAULT_LOCALE' in E:\domains\0\example.com\user\htdocs\config.php on line 14 Notice: Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' in E:\domains\0\example.com\user\htdocs\config.php on line 59 Here are the lines of code define(PROJECT_DIR, realpath('./')); define(LOCALE_DIR, PROJECT_DIR .'/locale'); define(DEFAULT_LOCALE, 'tr_TR'); T_setlocale(LC_MESSAGES, $locale); I really cant work out why this wouldn't work. The only experience I have with PHP is a couple of wordpress blogs so be gentle Link to comment https://forums.phpfreaks.com/topic/154420-solved-having-problems-with-undefined-constants/ Share on other sites More sharing options...
jackpf Posted April 16, 2009 Share Posted April 16, 2009 Constant's names need to be encapsulated within quotes. Link to comment https://forums.phpfreaks.com/topic/154420-solved-having-problems-with-undefined-constants/#findComment-811929 Share on other sites More sharing options...
Technaut Posted April 16, 2009 Author Share Posted April 16, 2009 so should it be this:- define("PROJECT_DIR", realpath('./')); define("LOCALE_DIR", PROJECT_DIR .'/locale'); define("DEFAULT_LOCALE", 'tr_TR'); or does the right hand side needs quotes too Link to comment https://forums.phpfreaks.com/topic/154420-solved-having-problems-with-undefined-constants/#findComment-811939 Share on other sites More sharing options...
jackpf Posted April 16, 2009 Share Posted April 16, 2009 Anything that's a string must be quoted. So pretty much anything that isn't an int, constant or variable. So yeah. Link to comment https://forums.phpfreaks.com/topic/154420-solved-having-problems-with-undefined-constants/#findComment-811944 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.