Check your PHP version first, if you're on a webhost.
I spent about 3 hours googling and searching to try to figure out why my code was returning an error, only to realize that my host inadvertently disabled PHP5 access on me (I sent in a ticket, they fixed it in about 5 minutes). For the past 3 hours I was trying to fix PHP5 code running on PHP4 engine.
I was in the middle of writing a post to ask for help here, when I just decided to make the ol' "phpinfo();" script and see what I could find. First thing I saw was "PHP Version 4.4.7" and was so happy (and angry) that it wasn't an error in the code that I couldn't figure out to save my life.
Advice on Code Debugging
Moderator: General Moderators
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
Add something like this on the begin of the script will save you the above trouble.
Code: Select all
if (version_compare('5.0.0', phpversion(), '>='))
exit('requires PHP 5.0.0 or higher');