CPanel PHP Error Logs

#1
Hello,
We recently installed Litespeed on a few servers of ours that are running WHM/Cpanel and AlmaLinux. When running Apache, each user can access their PHP error logs in their home/ACCOUNT/logs directory. But once we switch over to Litespeed, those logs stop. I understand Litespeed logs to one central log file located at /var/log/apache2/error_log - but is there a way to have the same behavior as Apache? And log to the home/ACCOUNT/logs directory for each account?

Thanks,
Chris
 

serpent_driver

Well-Known Member
#4
If you have LSWS and WHM/cPanel nothing has to be done. cPanel provides access_log and error_log for each user/account. If it is different with your installation please contact cPanel support.
 
#5
Where are those logs found though for each CPanel account? In the /home/ACCOUNT/logs folder like they used to be? Or is everything compiled into 1 log now in the /var/log/apache2/error_log?
 
#7
I believe that's with CloudLinux. We are running MultiPHP Manager.

PHP Error logging is configured correctly inside the MultiPHP Manager because as soon as I turn LSWS off, it goes back to logging everything perfectly fine for all accounts. But as soon as I turn LSWS on, it stops logging PHP errors to the accounts. From everything I've read, LSWS is supposed to use what's in the MultiPHP Manager. Well - that's not happening and I can't figure out why. Could there be a permissions issue?
 

serpent_driver

Well-Known Member
#8
If you use LSWS with cPanel, then cPanel controls where the error.log is stored, but you have to enable error logging. If it isn't enabled no errors are logged.
 
#13
Well - I figured out the issue. I feel a little stupid, but it may help someone else. PHP-FPM stores the PHP error logs in the home/$user/logs directory. It does not use the settings from the php.ini file. When you switch over to LiteSpeed, it pulls the log location from the php.ini file which is typically set to the root public_html folder. So the logs were simply switched to whatever is specificied in the php.ini file and I kept looking in the /home/$user/logs directory thinking they weren't working.
 
Top