Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Constant PHP error Use of undefined constant PATH_LOCAL_CACHE
jokismo
New
Hello,
My apache server constantly returns this line:
PHP Notice: Use of undefined constant PATH_LOCAL_CACHE - assumed 'PATH_LOCAL_CACHE' in C:\Apache24\htdocs\conf\config-defaults.php on line 26, referer: http://forums.knockoptions.com/index.php?p=/
Anyone have any idea what is causing this/ how I can fix it?
Thank you in advance.
0
Comments
edited...
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
yeah i have settings configured in config.php according to the documentation in the code of config-defaults.php it says 'This is the global application configuration file that sets up default // values for configuration settings.' so i assume it loads config-defaults.php and then config.php?
anyway i deleted the line and it surpressed the error, so i guess i am ok?
I am surprised no one else reported this error, it was erroring out every few seconds with the same line and causing my apache server to eventually go down from error overload.
I also was able to supress the error using error_reporting = E_ALL & ~E_NOTICE in my php settings, any idea which is the better solution? Is there no ill effect from removing the line from config-defaults.php?
thank you,
Kenji
it does look like in bootstrap.php -
loads config-defaults.php and then server specific config.php.
I'm going to take that sugggestion back, it may not be a great idea to delete line.
so I am not sure why you get the error.
do you have a cache directory off of PATH_ROOT? if not create one.
generally Changes should be made to config.php, so it is curious why the constants are not being defined.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yeah its weird, i looked through the bootstrap also and saw it being defined, which was why i was completely at a loss as to why it was erroring out.
My /cache is where it originated by default, in the root directory of the vanilla installation
I guess i will put the code line back and just set error_reporting = E_ALL & ~E_NOTICE in my php settings since I wasn't encountering any actual functionality errors on the forum.
you could try echoing out constants in bootstrap.php to see what is happening.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
too much other stuff going on to spend more time troubleshooting this for now but if i find out it is giving me a problem down the road i will update.
thanks for you help peregrine.
also check to see if you have a conf/constants.php
that could also be problematical, if you don't have it.
that should set everything properly.
constants.php gets loaded in bootstrap if
VANILLA_CONSTANTS is not defined.
once constants.php is loaded VANILLA_CONSTANTS is defined and set to TRUE.
also
If your constants don't show up in your included or required files, then you probably have php safe mode turned on!
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
constants.php - exists
php safe mode is off, PHP Version 5.4.7: according to php.net This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
i came to the conclusion that its a global variables problem but im having problems getting my php to accept the register_global flag both in php.ini and .htaccess
php seems to ignore the setting, it doesnt show up in my phpinfo.
ive tried putting php.ini in both the root folder and in /conf with the register_global flag enabled as well.
thanks again for your help with the troubleshooting, still hitting a wall though
vanilla should work fine with register_global set to off.
register globals also.
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
I'd still echo in bootstrap when you want to pursue.
or use
print_r(get_defined_constants(true));
and after thinking about it - you probably don't have a directory
cache/Filecache
so commenting it out probably is fine.
$Configuration['Cache']['Filecache']['Store'] = PATH_LOCAL_CACHE.'/Filecache';
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.