Results 1 to 1 of 1

Thread: PHP pages giving 500 error? Check the module!

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2007

    Default PHP pages giving 500 error? Check the module!

    Several customers have recently run into errors opening PHP-based pages that had previously worked just fine. The error would look like this (in Firefox):
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/1.3.39 Server at Port 80
    The reason for this error is commonly that the PHP module is not being loaded with Apache. To fix it, follow these steps:

    1. Log into your server via SSH.
    2. Enter the command 'php -v' at the command line (to get your currently-installed PHP version). The top line should say something like "PHP 5.2.4 (cli) (built: Sep 18 2007 08:50:5" The 3 numbers directly after PHP are the version number.
    3. Open /etc/httpd/conf/httpd.conf in your favorite editor.
    4. Look for a line that starts with 'LoadModule' and ends with one of these:
    LoadModule php4_module libexec/ OR
    LoadModule php5_module libexec/

    Uncomment whichever line applies to the major version of PHP you determined in step 2 above (4 or 5), save httpd.conf, and restart the web service (/etc/init.d/httpd restart). Your PHP pages should display normally once again.
    Last edited by ToddatSpry; 11-09-2007 at 03:39 PM. Reason: replaced 404 w/ 500


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts