Debian, ISPConfig 3.0.3.3, mod_fcgi+suExec, PHP not showing errors

Discussion in 'Installation/Configuration' started by radim_h, Oct 20, 2011.

  1. radim_h

    radim_h Member

    Hello,

    maybe somebody can give me some advice.

    i have started migrate pages from ISPC2 to ISPC3, all new pages are created under mod_fcgi + SuEXEC

    Now i have a problem, webpages are not showing any php errors
    it doesnt matter what i set in
    /etc/php5/cgi/php.ini or /etc/php5/apache2/php.in section error_reporting
    any of choices
    Default Value: E_ALL & ~E_NOTICE
    Development Value: E_ALL | E_STRICT
    Production Value: E_ALL & ~E_DEPRECATED

    is not showing any error for pages in browser
    ?
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Do the pages work or do you see just a white page? If you get just a white page, then take a look at the error.log of the website.

    If you migrated the pages, please check that all files and folders are owned by the web user and client group of the website, if the files are owned by root, then php-fcgi will fail with a security error in the error.log and show just a white page.
     
  3. radim_h

    radim_h Member

    i have migrated pages by FTP so owner is good..

    1.
    when there is error, like bad mysql connection config, page is just white, instead of showing error defined in PHP code, as for example "wrong SQL connection"
    i'd like the web pages showing this error...

    2.
    error.log seems to work correctly
    only weird thing is that it is full of messages which werent shown under mod_php, as
    [warn] Undefined index:
    [warn] Undefined variable:

    can i show just
    [error] messages in error log ?

    again setting of erorr reporting in php doesn't seems to do any change


    does it all something to do with fcgi + suExec ?
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    No, I dont think so.

    The error_reporting setting in php ini defines just which errors are reported and not where they are reported. Since Debian 6, error reporting on screen is off by default to protect the web applications. To turn it on, edit the php.ini and change:

    display_errors = Off

    to:

    display_errors = On

    and restart apache.
     
  5. radim_h

    radim_h Member

    thank you for info!
     
  6. radim_h

    radim_h Member

    just for info

    Here is something about
    http://php.net/manual/en/errorfunc.configuration.php

    i was right about it
    When using PHP with Apache mod_fcgid and "log_errors = On", PHP errors get logged into Apache ErrorLog file with severity "warn". No matter what severity the PHP error itself has, the severity in the Apache log is "warn".

    some solutions on the page had no time for testing...
     
  7. jan-paul

    jan-paul New Member

    How to turn on error reporting in PHP, the right (ISPConfig 3) way

    Sorry for bumping this after 3 years or so, I searched howtoforge for the terms 'php error reporting' but got no useful hits. This is the thread I found via google, so that says something about it's relevance IMO.

    The correct way to turn on error reporting in PHP ISPConfig is easy:
    1. Choose the website for which to turn on PHP error reporting.
    2. Go to the tab 'Options'
    3. In the field for 'Custom php.ini settings' fill in: display_errors = On

    And now error reporting is active for this website; how cool is that?
     

Share This Page