Error Log in cPanel not working after LiteSpeed installation

Sindre

Well-Known Member
#1
Hello,

After I replaced Apache with LiteSpeed, the Error Log section in users' cPanel is not showing anything. I am trying to figure out from where it extracts this information, and it seems that the errors are written to a file 'error_log' in each vhost's document root.

How can I make this work? I really need it to work like before with Apache, as my clients depend on this functionality for PHP script debugging, etc.

I have tried different settings for the Log in LSWS admin, but nothing seems to help. Currently, the server log is set to "/usr/local/apache/logs/error_log" (log level Notice, stderr enabled) and access log is set to "/usr/local/apache/logs/access_log" on the server level. Only cPanel/WHM traffic and LSWS admin traffic seems to be logged to this access log, but that is ok. The main problem is the error log.

On the Web Console -> General tab, the Virtual Host Log (log level Notice) and Access Log is set to use Server's log.

Thank you,
Sindre
 

Sindre

Well-Known Member
#3
set log level to "INFO".
I tried this, but PHP errors still would not show. I finally solved it by adding this to php.ini:

Code:
error_log = /usr/local/apache/logs/error_log
However, it is not optimal as I would rather keep the vhosts PHP errors separate from my server log file. Seems like cPanel will only extract errors from the main apache error_log.

Also, all these errors now appear as one entry in the LiteSpeed admin.

If you know a way to fix this, please let me know.
 

mistwang

LiteSpeed Staff
#4
Are you using PHP suEXEC?

Litespeed does log PHP errors to apache error_log by default, maybe something wrong with php.ini settings.

I can take a look at your server if you PM me a temp root login with detail information on how to generate a PHP error to log file.
 

Sindre

Well-Known Member
#5
Are you using PHP suEXEC?

Litespeed does log PHP errors to apache error_log by default, maybe something wrong with php.ini settings.

I can take a look at your server if you PM me a temp root login with detail information on how to generate a PHP error to log file.
Yes, I'm using PHP suEXEC. php.ini was previously configured with 'error_log = error_log', which caused an error_log file to be created wherever the PHP script were located. I _believe_ the same thing happened under Apache as well, but then cPanel was able to retrieve the errors. Maybe errors were logged both to each vhost and to the global Apache error_log..

Anyway, after I changed the error_log path in php.ini, PHP now write erors to the apache error_log. So if that's how it's supposed to be, I think I leave it like this. Thanks for your offer, though.
 
Top