LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > Problem with cPanel error log and LiteSpeed

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2009, 03:34 PM
Sindre Sindre is offline
Member
 
Join Date: Dec 2008
Posts: 20
Default Problem with cPanel error log and LiteSpeed

Hello,

I am currently struggling with a problem related to the cPanel Error Log and LiteSpeed configured with suEXEC. I have set PHP to log errors to the server error_log in /usr/local/apache/logs/error_log. In LiteSpeed, the server error log level is set to Warning and the File Name = /usr/local/apache/logs/error_log.

The problem is that in order for PHP to be able to write to the error log, the log file must be world-writable (chmod 666) because of suEXEC. On log rotation, the permissions of the log file is reset to 644 and PHP errors are not logged. Is this expected behavior, or is there a solution to this problem? Now I have to pay attention to when the log is rotated, and then change the permissions manually.

With Apache I never had any problems with the error logs, so this is the only issue I have with LiteSpeed at the moment.

The best solution would be if each PHP error log could be stored in clients home directory (is this how cPanel/Apache does it by default?), instead of having a single server-wide file. However, I have not figured out how to accomplish this with cPanel.

Any advise is appreciated.
Reply With Quote
  #2  
Old 08-28-2009, 04:00 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 5,889
For log rotation, you can set the rotation point higher, and rotate it with your cron job, just "mv ..." will work, then create the log file with correct permission.

Quote:
Originally Posted by Sindre View Post
The best solution would be if each PHP error log could be stored in clients home directory (is this how cPanel/Apache does it by default?), instead of having a single server-wide file. However, I have not figured out how to accomplish this with cPanel.

Any advise is appreciated.
If you know how to customize cPanel's vhost template, you can add a

php_value error_log ....

directive to the vhost template.
Reply With Quote
  #3  
Old 08-28-2009, 04:33 PM
Sindre Sindre is offline
Member
 
Join Date: Dec 2008
Posts: 20
Quote:
Originally Posted by mistwang View Post
If you know how to customize cPanel's vhost template, you can add a

php_value error_log ....

directive to the vhost template.
Thanks, I haven't thought of that. However, do you know if cPanel will read error_log file from users home directory and display in cPanel -> Error Log page? Should the log file have owner of suEXEC user?
Reply With Quote
  #4  
Old 08-28-2009, 04:48 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 5,889
Quote:
Originally Posted by Sindre View Post
Thanks, I haven't thought of that. However, do you know if cPanel will read error_log file from users home directory and display in cPanel -> Error Log page? Should the log file have owner of suEXEC user?
I do not know, not likely cPanel does that.
But it is in user's home directory owned by that user, so they should have no problem accessing those files.
Reply With Quote
  #5  
Old 10-25-2009, 07:12 PM
Tarembah73 Tarembah73 is offline
New Member
 
Join Date: Oct 2009
Location: United States
Posts: 5
Default Problem with cPanel error log and LiteSpeed

On second thoughts i believe that the module is being loaded twice.
Is there any reason why apache would do that?
there is only one entry in the httpd.conf file.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:31 PM.



- Archive - Top
© Copyright 2003-2007 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.