Display Errors is both On and Off

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dana Cartwright

    Display Errors is both On and Off

    I have a website in which PHP errors are displayed, despite having them
    configured to not display.

    Here is a test file I created to explore this:

    <?php
    echo ini_get( 'display_errors ' );
    phpInfo();
    ?>

    The ini_get says "On", the phpInfo says "Off" (for display_errors in the PHP
    Core section).

    PHP 5.0.4

    I'm struggling to understand how, at runtime, I get these conflicting
    reports. The configuration files all say display_errors is OFF, and phpInfo
    agrees, but PHP acts like they are on, and ini_get shows why.


  • =?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=

    #2
    Re: Display Errors is both On and Off

    Dana Cartwright wrote:
    I have a website in which PHP errors are displayed, despite having
    them configured to not display.
    >
    Here is a test file I created to explore this:
    >
    <?php
    echo ini_get( 'display_errors ' );
    phpInfo();
    ?>
    >
    The ini_get says "On", the phpInfo says "Off" (for display_errors in
    the PHP Core section).
    >
    PHP 5.0.4
    >
    I'm struggling to understand how, at runtime, I get these conflicting
    reports. The configuration files all say display_errors is OFF, and
    phpInfo agrees, but PHP acts like they are on, and ini_get shows why.
    In which column does the phpinfo() show the display_errors setting as
    "Off"? "Local Value", "Master Value" or both?

    --
    Kim André Akerø
    - kimandre@NOSPAM betadome.com
    (remove NOSPAM to contact me directly)

    Comment

    • Dana Cartwright

      #3
      Re: Display Errors is both On and Off

      Dana Cartwright wrote:
      >
      >I have a website in which PHP errors are displayed, despite having
      >them configured to not display.
      >>
      >Here is a test file I created to explore this:
      >>
      ><?php
      > echo ini_get( 'display_errors ' );
      > phpInfo();
      >?>
      >>
      >The ini_get says "On", the phpInfo says "Off" (for display_errors in
      >the PHP Core section).
      >>
      >PHP 5.0.4
      >>
      >I'm struggling to understand how, at runtime, I get these conflicting
      >reports. The configuration files all say display_errors is OFF, and
      >phpInfo agrees, but PHP acts like they are on, and ini_get shows why.
      >
      In which column does the phpinfo() show the display_errors setting as
      "Off"? "Local Value", "Master Value" or both?
      Both "local" and "master" say Off.
      --
      Kim André Akerø
      - kimandre@NOSPAM betadome.com
      (remove NOSPAM to contact me directly)

      Comment

      • Toby A Inkster

        #4
        Re: Display Errors is both On and Off

        Dana Cartwright wrote:
        I have a website in which PHP errors are displayed, despite having them
        configured to not display.
        Have you used something like this in an .htaccess file?

        php_value display_errors off

        ?? Boolean flags like display_errors should be set using "php_flag" instead
        of "php_value" .

        --
        Toby A Inkster BSc (Hons) ARCS
        Contact Me ~ http://tobyinkster.co.uk/contact
        Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

        * = I'm getting there!

        Comment

        • Jerry Stuckle

          #5
          Re: Display Errors is both On and Off

          Dana Cartwright wrote:
          I have a website in which PHP errors are displayed, despite having them
          configured to not display.
          >
          Here is a test file I created to explore this:
          >
          <?php
          echo ini_get( 'display_errors ' );
          phpInfo();
          ?>
          >
          The ini_get says "On", the phpInfo says "Off" (for display_errors in the PHP
          Core section).
          >
          PHP 5.0.4
          >
          I'm struggling to understand how, at runtime, I get these conflicting
          reports. The configuration files all say display_errors is OFF, and phpInfo
          agrees, but PHP acts like they are on, and ini_get shows why.
          >
          >
          First of all, are you editing the correct php.ini file? (Probably, but
          it's always worth checking).

          Next - do you have the php.ini file overridden in your .htaccess or
          httpd.conf file?

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          Working...