On 2007-12-31 12:44, Jani Taskinen wrote:

> We have caught several actual bugs because of NOT using -n as people
> have had exotic settings not included in the stock php.ini files.
I've never doubt that. It certainly has its advantages as well.

> On Sun, 2007-12-30 at 14:47 +0100, Christian Hoffmann wrote:
>> 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.
> 
> But then the installed php wouldn't work either unless you fix the
> php.ini first. :)
That's right. Either you have to keep in mind to fix it before really
starting your new setup, or you can have some pseudo-automatic config
file updating.
If you think that case is rather uncommon -- ok, then imagine you are
simply testing for regressions and playing with zts/non-zts or
debug/non-debug while doing so. You don't even have to install the
resulting binaries, just run run-tests.php. :)


> Besides, the 'make test' does NOT include the extension lines from the
> php.ini. I added a fix for this long time ago to only load those shared
> extensions which were currently build. Not sure in what PHP version it
> was included in..but it is in the current PHP_5_2 branch.
You are right. I've never noticed that as we are loading extensions in
seperate ini files, i.e. we are using --with-config-file-scan-dir. It
looks like this case isn't accounted for in make test and I do not see
an easy way to do so.
So, sorry for implying that it is broken on a general level, it seems to
cause problems only when using --with-config-file-scan-dir. Do you have
any suggestions / possible fixes for that case by chance?

There is another problem though: Tests which spawn their own php
interpreter (such as Zend/tests/bug40236.phpt) do not load tmp-php.ini
but use the global ini file which does contain extension* directives.
These tests break.

If these two "edge" case were fixed, I'd be perfectly happy with the
fact that basically a global php.ini file is used.


-- 
Christian Hoffmann

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to