Hello, It us seen that some times, while installing some php script the server returns "500 Internal Server Error". How to avoid getting this error.? What is the default htacess file to get rid of the above error?
The only fix is to fix the script. This is not a client-side problem. You need to track down the error in your logs and resolve it. When I am installing new PHP scripts, I always run them from the command line first. If you can access an SSH shell on your host machine connect through that and navigate to the directory in which the script is located. Then run the command: php myscript.php If it chokes, you will see errors on the screen. Fix them. Once the screen version runs correctly, try accessing it through the web. Also, you can try putting something like this at the beginning of the new script. This allows you to redirect all errors to a specific file to help you track down errors in the script and fix them: error_reporting(E_ALL & ~E_NOTICE); ini_set("display_errors", "off"); ini_set("log_errors", "on"); ini_set("error_log", "/home/MY-HOME/php_errors");
I've had this issue before. What happened was our host didn't support the php_flag directive in .htaccess. We had to disable those to get the php scripts running again.