500 Internal Server Error


I just tried updating MySQL to 5.1 from 5.0 through my WHM console, and since I did, all my websites (that run PHP) are showing 500 Internal Server Error. I’m not sure if this is perhaps related to my .htaccess file, as if I just put basic HTML in the index it runs fine.

This is pretty urgent as sites are currently down! Any help would be appreciated
Thanks :wink:

What happens if you empty the .htaccess (or comment everything by starting each line with a #) and request the main index of the website?
If you still get a 500 error the problem is with PHP/MySQL and not with Apache.

Hi ScallioXTX,

Thanks for your reply.

If I remove everything from the htaccess file, I just get the PHP script in the source (because within the htaccess file are these lines):

Action application/x-httpd-php5 /cgi-sys/php5
AddType application/x-httpd-php5 .html .php .htm

Does this mean the problem probably lies with PHP?


Not necessarily. What happens if you comment out all lines except for those two?

Are you sure /cgi-sys/php5 exists btw?

If I leave just those two lines in, it’s the same, 500 error.

This is the exact same code I had in .htaccess before I upgraded MySQL, so I don’t see why something would change to make it not work?

It sounds to me like PHP and MySQL are not playing nicely anymore. Do you have an error log somewhere where you could look? (probably /var/log/httpd/error_log or similar)

Unfortunately I’m no expert so I don’t know where the logs are. :frowning:

This is really annoying as I thought I was just upgrading MySQL, I didn’t expect this to happen. I’ve sent you a PM to see if you could help out Scallio.

I have to say, I’m not sure it’s anything to do with SQL. I’ve uploaded these two files:

echo “test”;

Action application/x-httpd-php5 /cgi-sys/php5
AddType application/x-httpd-php5 .html .php .htm

This gives a 500 Internal Server Error. :nono:


Try removing the “5” as follows:

# .htaccess
Action application/x-httpd-php[COLOR="Red"][SIZE="4"]5[/SIZE][/COLOR] /cgi-sys/php5
AddType application/x-httpd-php[COLOR="Red"][SIZE="4"]5[/SIZE][/COLOR] .html .php .htm

BTW, this code SHOULD go in your httpd.conf file, NOT your .htaccess.