PDA

View Full Version : Getting "Notice: Use of undefined constant..." with some scripts on my server.



astounding
November 5th, 2006, 12:31
Hey,

While I had cPanel installed on my server all was fine. I then did a format and installed CentOS.

Forums and CMS scripts install without a problem.

But I noticed that with some scripts I'm getting these messages all over the place: Notice: Use of undefined constant....

Eg:
http://andre.110mb.com/phpbuild.php

OR

http://www.110mb.com/faq2/faq.php

I figured that this always happens whenever a script has an empty variable in it like: variable=" ";


It can't be the scripts as they all work fine on other servers. So I'm assuming this is something gotta do with my php config.

Any tips on how to fix this server wide?

Thanks.
-A

krakjoe
November 5th, 2006, 12:47
adjust the error reporting level, notices aren't a problem anyway, you use them for debuggin, mostly they won't affect the way a script works .....

It maybe possible that the scripts are designed to run with register globals on and you have it off, and vice versa.... in which case it will matter ...

Tree
November 5th, 2006, 13:36
Undefined constants is a problem. If there's a constant, it's most likely an important part of your script. Something's up. Although, it may have been there all along, and your error level was spontaneously adjusted.