SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I can't get php to repect its php.ini settings

    I have altered the line in php.ini about the errors, by using display_errors = On.
    Then I do a 'sudo apachectl restart' but when I run php_info() function again I see that the display_erorrs are still Off.
    I am changing the /etc/php.ini that php_info() function shows as the configuration file path.
    Any ideas?

  2. #2
    SitePoint Zealot
    Join Date
    Jun 2011
    Location
    Kolding, Denmark
    Posts
    108
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Check if any additional ini files are loaded, "Scan this dir for additional .ini files" in phpinfo() output, the setting might be changed there. Also this setting is PHP_INI_ALL, which that value can be set anywhere. So, the next thing to check would be apache config and .htaccess file.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    'Scan this dir for aditional .ini files' is (none).

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Apart from other settings overriding your ini, as @ronalds ; says, you also have to check your error_reporting level is set to show a low enough level of errors for them to be worthy of being shown at all.

    Start on a single page like this:
    PHP Code:
    <?php

    error_reporting
    (E_ALL);
    ini_set('display_errors','On');

    $arr = array();
    echo 
    $arr[1];

    // should get you an "undefined offset" error

    ?>
    Then uncomment the first 2 lines, check if there is an .htaccess file in this folder, or above it.

    Then check your httpd.conf file carefully, especially for the VirtualHost directives for this site.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •