PDA

View Full Version : PHP error Display?


vivek
02-06-2008, 09:44 AM
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
02-06-2008, 10:00 AM
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
02-06-2008, 10:01 AM
Check your php.ini and make sure display errors is enabled.

We recommend having it disabled for security reasons.

vivek
02-06-2008, 10:04 AM
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
02-06-2008, 10:05 AM
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
02-06-2008, 10:10 AM
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
02-06-2008, 10:18 AM
should have a button available.

I think I am missing it.
Can you tell me where is the button ?

Thanks

vivek
02-06-2008, 10:21 AM
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.?

mistwang
02-06-2008, 10:44 AM
something like "error log" as I remember.

vivek
02-06-2008, 10:56 AM
something like "error log" as I remember.

As far as I know, there is no such option in cPanel to see the Apache error.log file.

Correct me if I am wrong.

mistwang
02-06-2008, 11:01 AM
http://x3demob.cpx3demo.com:2082/frontend/x3/index.html
check the "Error log" button under "Logs" section.

vivek
02-06-2008, 11:34 AM
http://x3demob.cpx3demo.com:2082/frontend/x3/index.html
check the "Error log" button under "Logs" section.

Oh! I see. I thought that you are talking about WHM . Ok, thank you , I found it

I just have a question, Why dont we make a shortcut of litespeed error.log file in apache log's folder so that whenever cpanel reads apache log file , it display litespeed 's log?

vivek
02-06-2008, 11:39 AM
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
02-06-2008, 11:57 AM
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
02-06-2008, 04:12 PM
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.