Application works fine on localhost but fails on web server
If you ever run into situation, that your application works fine on localhost (or one of webhosting) but fails completely on webhost (or another server) then first thing, you should look for, is to check, if you don’t have an extra XHTML line in on of your files that you’re loading using include or require.
Meaning, that your loading and PHP-parsing these files. Because problem doesn’t exist, if you’re loading this files as simple text files, using file_get_contents for example.
Situation, I’m talking about most times causes a PHP syntax error saying, that there is an unexpected T_STRING in first line of one of the files used in an application.
Read More “Application works fine on localhost but fails on web server”