PHP error Display?

Discussion in 'Install/Configuration' started by vivek, Feb 6, 2008.

  1. vivek

    vivek Well-Known Member


    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
  2. mistwang

    mistwang LiteSpeed Staff

    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.
  3. xing

    xing LiteSpeed Staff

    Check your php.ini and make sure display errors is enabled.

    We recommend having it disabled for security reasons.
  4. vivek

    vivek Well-Known Member

    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
  5. vivek

    vivek Well-Known Member

    Sorry, I did not understand. In normal case , where we can see the php errors in cPanel ?
  6. mistwang

    mistwang LiteSpeed Staff

    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.
  7. vivek

    vivek Well-Known Member

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

  8. vivek

    vivek Well-Known Member

    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.?
  9. mistwang

    mistwang LiteSpeed Staff

    something like "error log" as I remember.
  10. vivek

    vivek Well-Known Member

    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.
  11. mistwang

    mistwang LiteSpeed Staff

  12. vivek

    vivek Well-Known Member

    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?
  13. vivek

    vivek Well-Known Member

    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.
  14. vivek

    vivek Well-Known Member


    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!

  15. mistwang

    mistwang LiteSpeed Staff

    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.

Share This Page