0

I'm trying to get some third-party PHP software to run on Windows (it runs on Ubuntu).

I'm using XAMMP with Apache/2.4.3, PHP/5.4.7

The php.ini file, C:\xampp\php\php.ini, is set to not report strict warnings as shown below:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

I know that PHP is reading this it's reported as the loaded configuration file in phpinfo() and if I intentionally put an error into it, apache can't restart.

This question has an answer that suggests modifying the root .htaccess as follows:

php_value display_errors 0
php_value error_reporting 30719 

This also had a comment which says that's the .htaccess is the only solution that worked for PHP 5.4.7.

However, still no luck. Short of switching to WAMP, is there anything else I should try?

Community
  • 1
  • 1
Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213
  • 2
    Perhaps the third-party software resets the error reporting level, overriding your settings? – Jon Feb 24 '13 at 16:51
  • 1
    This comment on php.net may be relevant: http://php.net/manual/en/function.error-reporting.php#98414 – Matt Browne Feb 24 '13 at 16:58
  • @Jon - I hardcoded "ini_set('display_errors', '0');" in the require command for the class where the first error was coming from and it got rid of all the error message. If you want to post an answer, I'll check it off. – Jack BeNimble Feb 24 '13 at 23:10
  • @JackBeNimble: Glad to help. Added an answer. – Jon Feb 24 '13 at 23:14

2 Answers2

4

I know that some WAMP packages will copy php.ini in C:\Windows. Run php -i and make sure that php is actually using C:\xampp\php\php.ini. Also remember that starting with PHP 5.4.0, E_STRICT became part of E_ALL.

Alexandru Guzinschi
  • 5,675
  • 1
  • 29
  • 40
1

It's possible that this third-party software you mention overrides the error reporting level itself after you and therefore "wins". Check for this and if that's what happens, configure it appropriately or make sure to override the settings last.

Jon
  • 428,835
  • 81
  • 738
  • 806