Issue: 500 Internal Server Error
We have seen this error come-up when client's migrate scripts to our server. Client attempt to install a PHP script (such as Drupal, Magento, Moodle, Wordpress, Concrete5 etc…) from sources or previous installation of LAMP with mod_php. Upon testing the installation on IndicHosts server, an error '500 Internal Server Error' is observed on web browser.
Common sources of the issue are;
Reason & Background: As our server runs apache with suPHP and does not use mod_php, PHP scripts are executed as 'username' instead of ‘apache’ or ‘nobody’. Hence all your script files and subdirectories need to be owned by username. In addition, most script's documentation is focused towards basic LAMP (Linux, Apache, MySQL, PHP) with mod_php deployments. The script's documentation recommend that certain directories and files should be set to world writable (i.e. 777 or 666.). Often PHP files, as part of source archive, are distributed with the executable permission of 777 or 775.
On IndicHosts servers, you should NOT have any world writable files or directories (with permission levels such as 0777, 0666, 0770, 0660, etc.) and our PHP script files (.php) should NOT be executable (with permission levels such as 0755) even if the official script documentation recommends that. This is a mandatory security requirement for PHP scripts on IndicHosts servers.
Hence to correct the 500 Internal Server Error on IndicHosts.net server, you need to do the following;
chmod 755 directory
chmod 644 filename.php
robert:robert
. You can do correct this by running this command in cPanel >> Terminal (If you don't have terminal enabled, raise a ticket and ask us enable terminal on your domain)chown username:username directory
chown username:username filename.php
Once you have rectified the above, refresh the script URL. If the error persists, please raise a ticket with the script details.
Tip: the error_log file in the script directory shows the exact PHP error behind the 500 internal server error