HTTP 500 - Internal server error after Database Setup Screen

After installing elgg I am prompted to finish the install by filling out the Database connection info. After filling this out (with connection data that works through a sql query, dsn, etc.) I get the blank page showing the HTTP 500 - Internal sever error.

 

  • Yes, my system meets the spec (Apache Server, PHP 5, mySql)
  • Yes, the mod_rewrite is working
  • Yes, the php test page works
  • Yes, the database connection information is correct
  • Yes, I have tried to rename the .htaccess file
  • Yes, I have re-installed and coped three times

I am completely lost at this point. Can anyone give me any other pointers? Also, I am on a Windows server.

Please help me elgg gods!!

  • If you're running latest SVN, in .htaccess try commenting out the:

    Header append Vary User-Agent env=!dont-vary

    In the mod_deflate definition.

    I've had this cause problems on some Apache 2 configurations. Also, your apache log files should give you a bit more information as to what is triggering this error.

  • I am not sure whar "SVN" means, but if it's the latest version of elgg, Apache, or PHP, then yes. When I open the .htaccess file I find nothing when searching for "mod_deflate" or "Header append..."

    Also, none of my files in Apache's Error directory have a time/datestamp corrletating to this install.

  • Ha, maybe I was drunk and missed the blatent error log. I know I said there wasn't one, I was wrong :)

    Here is what it has at the bottom:

    [Thu Mar 05 11:02:00 2009] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function mysql_connect() in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\database.php on line 54
    [Thu Mar 05 11:02:08 2009] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function mysql_connect() in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\database.php on line 54
    [Thu Mar 05 11:02:17 2009] [error] [client 127.0.0.1] PHP Fatal error:  Call to undefined function mysql_connect() in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\database.php on line 54, referer: http://localhost:8080/

     

  • This appears to be saying that you are somehow running a version of PHP without MySQL support!

    Amazing if true.

    mysql_connect is normally a standard PHP function. See:

    http://nl.php.net/mysql_connect

  • Right, and it even says so in the php.ini file? Weird...but could it be the setup of the mySql server? I am running a Virtual Dedicated Server from GoDaddy and the mySql server was already setup.

  • I suggest that you get on to your hosting company then, sounds like they've fluffed it somewhere!

    Also while you're at it make sure they've got php_gd configured as this will prevent user icons from working.

  • Well, I found and confirmed that mySql support is turned off by default on Windows installations for PHP 5+ (found at this url http://www.php.net/manual/en/mysql.installation.php)

    So, I am not sure if it's mySql afterall. I am following the directions in the link above and I will post my results.

    Thanks all!

  • Wow, ok this is what I found. I reinstalled PHP and noticed that the mySql is listed in the Extensions setup. I must have completetly missed that section, what a bonehead I am.

    However, I now get the System Settings page, which was a welcome surpirse, but it to fails. I fill it out with the appropriate paths and I get another HTTP 500 error, with the following error in the Apache log.

    [Fri Mar 06 09:08:26 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/twg/action, referer: http://localhost:8080/twg/install.php
    [Fri Mar 06 09:09:27 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/twg/action, referer: http://localhost:8080/twg/install.php
    [Fri Mar 06 09:09:32 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/twg/action

    Any bright ideas? Obviously the file exists (I checked) and the permissions seem suitable.

    Help!!

  • Correction above, when I complete the Elgg Settings page and click save, I get a 404 File Not Found error. Once I try to redo, the Database screen comes back. It let's me save the DB stuff and says I was successful, but still gives me the 404 error after the settings page.

    Am I doing something wrong?

  • This is a common experience when mod_rewrite isn't installed, Apache isn't configured to pick up mod_rewrite commands from an .htaccess file, or the RewriteBase is wrong.

    See if these troubleshooting tips help, and if not, try adding "AllowOverride All" in your web server configuration file (usually httpd.conf) for this virtual host.