Always get trouble finding PHP errors, log files, seems 500 error always shows

Does Virtualmin need any specific setting to make PHP errors show? I always have issues finding PHP errors.

I have set all the necessary settings in .htaccess and the local php.ini file to display errors, but I always just get an internal server 500 error.

I have only just discovered in my users home directory is a folder logs and there is an error_log which includes the errors I have spent ages looking for, they were not in Apaches error_log log, and in Webmin -> Logs are not listed there, so I have spent ages trying to turn PHP errors on (failing) and trying to find the logs (eventually found!).

So my question is, how come Virtualmin is like this, why cant it display errors when turning PHP errors on in the users php.ini file (phpinfo states they are all on).

Or should it be turning them on and maybe theres something else I am missing?

Thanks a lot

I tell you what, maybe its my script… I am running exec(), calling lame to process some mp3 files. I wonder if this is failing (it works on half my files then stops and I get the error, then I have to run it again to process the rest), and am wondering if this is not returning the correct headers or something, the error logs just say “Premature end of script headers”. So maybe this scenario would not use php display errors. I dont know.

Oh, wow. I changed the PHP to CGI instead of FCGId any I get no errors, my script executes fine. Why is that?? I will lookup the difference as I am clueless.


Yeah, there are cases where folks find that CGI works best for them. It’s no problem to use CGI… if that’s working for you, that’s great.

Regarding the logs – only global Apache issues go into the system-wide Apache error log.

Issues specific to a given domain go into the domain’s error log, in $HOME/logs/error_log.



Would you mind letting me know what thie difference is between FCGI and CGI because all my sites on VM are FCGI, but obviously CGI was better for this process… am I losing out using one or the other? Whats the difference/advantages/disadvantages? Couldn’t find much info online.