PHP error Display?

vivek

Well-Known Member
#1
Hello

I think LiteSpeed is not displaying php errors.

How to enable it ?

The php config is the default, so I guess the error display option in php.ini will be the default (display errors)

Any help is appreciated.

Thank you
Vivek
 

mistwang

LiteSpeed Staff
#2
If you mean displaying error in user's browser, you need to check a phpinfo page to make sure php configuration has been set properly.

If you want to user view PHP errors in cPanel, you need to change the location of error.log to /usr/local/apache/log/error_log, where apache place its error log.
 

xing

LiteSpeed Staff
#3
Check your php.ini and make sure display errors is enabled.

We recommend having it disabled for security reasons.
 

vivek

Well-Known Member
#4
Thanks, I rechecked php.ini and found it is off.

We need this because there are some developors who need it for debugging their application.

thank you
 

vivek

Well-Known Member
#5
If you want to user view PHP errors in cPanel, you need to change the location of error.log to /usr/local/apache/log/error_log, where apache place its error log.
Sorry, I did not understand. In normal case , where we can see the php errors in cPanel ?
 

mistwang

LiteSpeed Staff
#6
They should be able to override PHP error_reporting configuration in .htaccess with "php_value" directive. It should be off globally.
cPanel can view error log for each vhost. should have a button available.
 

vivek

Well-Known Member
#8
Where can I see a button or hyperlink for viewing Apache logs in cPanel , so that I can replace the log with LiteSpeed's log file.?
 

vivek

Well-Known Member
#13
One more, How can cPanel distinguish which line in litespeed log files is belongs to the selected domain(cpanel account) and which are not ?

I think cPanel can do this with Apache's log and that is why cPanel is displaying the logs for a single domain.

Please dont mind If I am asking noob questions, Just want to study these things.
 

vivek

Well-Known Member
#14
Woh!

Seems like it is really working!

I did this.

cd /usr/local/apache/logs/
rm -rf /usr/local/apache/logs/error_log
ln -s /home/lsws/logs/error.log error_log

And when I opened a cPanel account, woh! I can see the log there for that single domain!

Vivek
 

mistwang

LiteSpeed Staff
#15
We have updated our default httpd_config.xml for cPanel installation, to write error log to /usr/local/apache/logs/error_log, so, it should work out of box.
 
Top