Error 500 on all PHP related things (Joomla, PHPmyadmin) - don't know how to fix despite backups

Hello everybody,

Today I did something stupid with the PHP on my server (I think). I needed to set a higher upload limit for a script in Joomla. So I changed the max filesize. However, I did this with the php.ini file manually in the PHP service options. I think I should have done it in the designated options menu for that but I didn’t see it untill I already manually editted it.

Anyways, I started getting Internal Error 500 from everything regarding PHP. So I cant reach my joomla sites and I neither can I access PHPmyadmin. I can access the Viritualmin configuration normally and my mail also still works fine.

Well, I thought lets run a backup from yesterday shan’t I. But after these backups are restored, I still get Error 500 from everything PHP related, even though the PHP settings are back to normal?

So this confused me greatly, and I honestly have no idea how to fix this. I hope to be able to get an answer here since I tried searching the forum but everything I found had completly different situations and answers I do not understand.

Please understand that I am a Linux novice, and I still have to do everything with a guide.

Greetings and many thanks in advance,
Dennis

Are you sure you don’t changed php mode somehow? What is current php mode? Also check Apache logs.

Hi Virtual, thank you for your answer. I am not aware of changing the PHP mode. But my fiddeling in areas I shouldnt have been fiddeling may have caused some very unwanted concequences ofcourse ;). Unfortunally I am not sure where I can find the current PHP mode. Can you tell me where?

I have been checking the apache logs. It indeed spits out some errors:

[Sun Jul 15 20:59:09 2012] [warn] [client 207.46.204.224] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 20:59:09 2012] [error] [client 207.46.204.224] Premature end of script headers: index.php [Sun Jul 15 21:07:46 2012] [warn] [client 207.46.13.118] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 21:07:46 2012] [error] [client 207.46.13.118] Premature end of script headers: index.php [Sun Jul 15 21:57:40 2012] [warn] [client 65.52.104.10] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 21:57:40 2012] [error] [client 65.52.104.10] Premature end of script headers: index.php [Sun Jul 15 21:59:11 2012] [warn] [client 65.52.104.10] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 21:59:11 2012] [error] [client 65.52.104.10] Premature end of script headers: index.php [Sun Jul 15 22:09:40 2012] [warn] [client 65.52.104.10] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 22:09:40 2012] [error] [client 65.52.104.10] Premature end of script headers: index.php [Sun Jul 15 22:11:09 2012] [warn] [client 65.52.104.10] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 22:11:09 2012] [error] [client 65.52.104.10] Premature end of script headers: index.php [Sun Jul 15 22:33:17 2012] [warn] [client 65.52.108.177] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 22:33:17 2012] [error] [client 65.52.108.177] Premature end of script headers: index.php [Sun Jul 15 22:34:42 2012] [warn] [client 65.52.108.177] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 22:34:42 2012] [error] [client 65.52.108.177] Premature end of script headers: index.php [Sun Jul 15 22:38:35 2012] [warn] [client 64.246.187.42] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://whois.domaintools.com/dennisderuiter.net [Sun Jul 15 22:38:35 2012] [error] [client 64.246.187.42] Premature end of script headers: index.php, referer: http://whois.domaintools.com/dennisderuiter.net [Sun Jul 15 22:49:24 2012] [warn] [client 62.45.65.73] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Jul 15 22:49:24 2012] [error] [client 62.45.65.73] Premature end of script headers: index.php

From what I understand, FastCGI has something to do with PHP, as does mod_fcgid. But I do not know what to do with this whatsoever.

Sorry, Linux noob here :).

Howdy,

Hmm, those logs don’t seem to show an obvious cause. It looks like you have FCGID there are your PHP Execution Mode. One thing you could try is to change it to CGI – that may resolve it, or at least may give some better error messages.

You can change that in Server Configuration -> Website Options -> PHP Execution Mode.

After changing that to CGI, what errors do you see in the error logs in $HOME/logs/error_log?

-Eric

In addition: the eorror Premature end of script headers sounds like a permission problem.
Did you alter and then save the file as root?
Per haps the php.ini file belongs to root now instead of the original owner?
Also check if the folders and files properties are 755 and files are 644

I still do not know what is wrong. However, I did restore another backup and I suddenly had my PHP working again. So my websites are reachable again.

However a new problem has arisen… I cannot make viritual servers anymore.

It has this error:

Failed to create virtual server : setquota: Cannot stat() mounted device /dev/root: No such file or directory setquota: Mountpoint (or device) / not found or has no quota enabled. setquota: Not all specified mountpoints are using quota.

I found this solution: http://blog.saltriversystems.com/2011/11/virtualmin-and-quotas/

But I get stuck at the quotaon -a command, with it saying:

[root@vps590 ~]# quotaon -a quotaon: Cannot stat() mounted device /dev/root: No such file or directory

By the way, I am running Cent OS 6.3 64 bit on kernel 3.2.5.

However I think I should make a new thread for that?

I’ve seen that quotaon issue with Xen-based VPS’s… what you may want to do is make a symbolic link from /dev/root to your root mountpoint.

If you have any additional questions on that, then yeah, open up a new thread and we can talk about it there :slight_smile:

-Eric