There was a problem loading the comments.

500 Internal Server Error

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
500 Internal Server Error

I have seen this come up when users migrate to our server. They will install a PHP script such as Drupal, Magento, Moodle, Wordpress, Concrete5 etc… from sources or previous installation.

Upon testing the installation, '500 Internal Server Error' is observed on web browser. Common source of the issue are
  1. Directory and/or file permissions
  2. Directory and/or file ownership
  3. php_value or php_flag directives in your .htaccess
Often script's documentation is geared towards basic LAMP (Linux, Apache, MySQL, PHP) setup with mod_php. The script's documentation suggest 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.

As our server run suPHP, Apache does not use mod_php. Scripts are not executed by the ‘apache’ or ‘nobody’ user. Instead suPHP will run the PHP process as the 'user' that the file belongs to. For security purposes, which are true regardless of the script’s documentation,

  1. The files and directories should be owned by proper user that they belong to. If the username is ‘robert’ the files should be owned and grouped to 'robert'.
  2. The files and directories should NOT be owned to ‘root’, ‘nobody’ or ‘apache’ or 'robertjunior' etc.
  3. All directories should be set to permission level of 0755
  4. All files should be set to permission level of 0644.
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, such as 0755 but set to 0644

Check and remove any php_value or php_flag directives in your .htaccess by removing the line or commenting it out with #prefix

Please rectify the same and retry the URL. Should the issue persist, please update us.

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  


Self-Hosted Help Desk Software by SupportPal
© Indichosts.net