This can be due to several factors. The first thing to check is that the permissions on the file and all relative files to it are set to 755 which you can set in your FTP client or in SSH via chmod.
When multiple files are selected for a permission change in some ftp programs, the ftp program will not set all files to that change if just one of the scripts is already set to 755. Verify each file is set to 755 and set each individually if necessary.
The next thing is to make sure all the path configurations within the file are correct.
Also often, an FTP client will upload a file in binary instead of ascii when it is set to auto. Force the program to upload the file in ascii then try again.
Often you can find a forum or faq on the programs website assisting you with common errors like this one.
Another common cause is a bad .htaccess file. A command within it may not work. We run PHP on our servers in CGI mode for security so you may need to run a command differently.