php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43035 Tests affected by system php.ini file
Submitted: 2007-10-19 12:37 UTC Modified: 2007-11-21 08:21 UTC
From: chad at herballure dot com Assigned: jani (profile)
Status: Closed Package: *General Issues
PHP Version: 5.2.5RC1 OS: Linux
Private report: No CVE-ID: None
 [2007-10-19 12:37 UTC] chad at herballure dot com
Description:
------------
ignore_repeated_errors, error_reporting, and display_errors in the system php.ini file can interfere with testing, causing bogus failure reports. Tests should run in a known-good environment, not under the system's /usr/local/lib/php.ini settings.

388 additional failures can be provoked in 5.2.5RC1 this way. This wastes the time of both PHP-QA (who get bogus reports) and users (who have to hide the system php.ini by hand and replace it after running tests--if they remember).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-19 14:04 UTC] derick@php.net
The tests are still broken, but not because of the reason that you mention. All tests should run under *any* environment - although some of the settings we force to avoid some of the things you mention.
 [2007-10-30 22:14 UTC] jani@php.net
It's intentional to use system php.ini to find possible issues with different settings being something else than default. To help us fix the  tests or some bug in PHP you need to come up with a diff against the stock php.ini-dist / php.ini-recommended (depending what you used as base for your php.ini).
 [2007-11-07 13:25 UTC] chad at herballure dot com
; Differences from php.ini-dist
output_buffering = 4096
allow_call_time_pass_reference = Off
safe_mode_protected_env_vars = LD_LIBRARY_PATH,LD_DEBUG,LD_PRELOAD
expose_php = Off
memory_limit = 24M
error_reporting = E_ALL
display_startup_errors = On
log_errors = On
; this is a troublesome one:
ignore_repeated_errors = On
html_errors = Off
register_argc_argv = Off
post_max_size = 200M
default_charset = "iso-8859-1"
include_path = ".:/local/data/php/include:/local/pkgs/php/lib/php"
upload_max_filesize = 200M
allow_url_fopen = Off
mysql.max_persistent = 10
mysql.max_links = 15
; sessions saved on tmpfs
session.save_path = "/local/data/php/session"
session.use_only_cookies = 1
session.name = SessionKey
session.gc_maxlifetime = 3600
session.bug_compat_42 = 0
session.hash_bits_per_character = 6
 [2007-11-19 18:38 UTC] hoffie at gentoo dot org
While it might be really useful to test PHP in a lot of different environments, there is at least one case where using a global php.ini does not make any sense: If you have a global PHP installed (no-zts, no-debug) and have any extensions (and load them in the global php.ini file) but you are building php with zts and/or debug, tests will fail because PHP is unable to load the extensions which were built for no-debug-no-zts (obviously).
We are using ./run-tests.php -n and are patching any tests which call their own interpreter (if you want the patches, just tell me and I'll send them). However, I don't think this is a good solution...

(I already mentioned this issue on IRC and that was the reason for me to create patches for that...)
 [2007-11-21 07:55 UTC] jani@php.net
This zts/debug issue shall be solved by introducing the #if..#else..#endif construct in php.ini but it's another issue. 
I'm checking these specific settings now.
 [2007-11-21 08:21 UTC] jani@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 20:01:29 2024 UTC