views:

35

answers:

1

I have PHP 5.2.10 and PHP 5.2.14 (x86 non-threadsafe Win32 builds) installed on a Windows 2008 R2 server and on Windows 7 64 bit.

For some reason PHP 5.2.14 refuses to show error messages.

Even when I set the following settings in php.ini I don't get any errors reported if I use 5.2.14:

error_reporting = E_ALL
display_errors = On

This happens even when running a test script from the command line using php.exe with a deliberate syntax error:

c:\php>php test.php

PHP is using the correct php.ini file because I can see my settings change when I run php.exe -i.

I also notice that php.exe in PHP 5.2.14 is very slow to start up.

When I perform the same set of tests using PHP 5.2.10 on the same machines I get error messages reported just fine.

Both of the php.ini files are stock (based off of php.ini-recommended) but with the error_reporting and display_errors settings modified.

Has anyone else experienced this problem?

+1  A: 

You might have to enable display_startup_errors as well:

display_startup_errors  boolean

Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed. It's strongly recommended to keep display_startup_errors off, except for debugging.

You can also try to lint the file with c:\php>php -l test.php to test for syntax errors.

Gordon
You learn something new every day. Turns out that PHP wasn't able to load a the SQLite3 extension because the pdo.dll extension (has a dependency on this) wasn't uncommented. With `display_startup_errors` set to off this seemed to cause parsing errors to be swallowed up. Thanks very much.
Kev
Kev