On 2007-12-30 04:16, phpxcache wrote: > i have the following settings in my /etc/php.ini > pcre.backtrack_limit=10000 > pcre.recursion_limit=10000000 > test case > ini_get_all() tests [ext/standard/tests/general_functions/ini_get_all.phpt] > FAIL. but after i remove the settings, it will PASS. > > Bug #43128 Very long class name causes segfault [Zend/tests/bug43128.phpt] > also FAIL because i have memory_limit set to 50M in /etc/php.ini, PASS > if i set it to 100M You should not blame php.net devs in case of bug 43128 [1], as the relevant security patch which adds this test has not been committed to the official stable branch, looks like only 5.3+ will have the fix. So, sadly, this patch + test is Gentoo-specific at the moment. Sadly, to verify if the problem is fixed (that's what the test case is supposed to check) requires pretty long strings, so a high memory limit might be needed.
> is it expected that the test case should depends on users' ini settings? I asked that myself several times as well. It seems wrong to me to use global php.ini files when running tests for a possibly completely unrelated build. Last time I asked on IRC, the "solution" was to fix those tests to hardcode the needed ini settings in the --INI-- section. While this fixes the problem itself, it still leaves certain other problems unfixed. Just consider the following scenario: You've got an existing PHP installation. Let's assume you are using Apache w/ a multi-threaded mpm and as such have built php with zts. All your extensions are built with zend thread safety as well, of course. Then you decide that switching to another web server and using FastCGI might be better, as such you turn off zts for the new build as you don't need it anymore. Building works fine, but suddenly almost all tests are starting to fail. Why? Because run-tests.php uses the global php.ini file and tries to load your zts extensions which cannot work for obvious reasons. IMO, make test is supposed to test the PHP install which is going to be installed, not some parts of the new PHP install and some parts of the old configuration. As such, we (in case of Gentoo/php) are replacing all calls to the php cli binary with calls to "php -n". Now make test does what we want, we are happy, the user is happy, everone is happy. I offered the necessary patches multiple times, but noone wanted them. I'd be happy to know what php developers would suggest as a proper fix for this problem, if they consider "php -n" wrong. [1] http://bugs.php.net/43128 -- Christian Hoffmann
signature.asc
Description: OpenPGP digital signature