Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34300 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16188 invoked by uid 1010); 31 Dec 2007 13:53:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 16173 invoked from network); 31 Dec 2007 13:53:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2007 13:53:02 -0000 Authentication-Results: pb1.pair.com header.from=hoffie@gentoo.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=hoffie@gentoo.org; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain gentoo.org does not designate 217.20.118.221 as permitted sender) X-PHP-List-Original-Sender: hoffie@gentoo.org X-Host-Fingerprint: 217.20.118.221 hesasys.org Received: from [217.20.118.221] ([217.20.118.221:36940] helo=srv.hoffie.info) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/5F-02434-C34F8774 for ; Mon, 31 Dec 2007 08:53:02 -0500 Received: from [192.168.1.2] (p5494BC43.dip.t-dialin.net [84.148.188.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by srv.hoffie.info (Postfix) with ESMTP id 6090A57EE5; Mon, 31 Dec 2007 14:52:58 +0100 (CET) Message-ID: <4778F46E.5000509@gentoo.org> Date: Mon, 31 Dec 2007 14:53:50 +0100 User-Agent: Thunderbird 2.0.0.9 (X11/20071211) MIME-Version: 1.0 To: jani.taskinen@iki.fi CC: phpxcache , php-dev List References: <28139bc0712291916y2874424eg889334eeb462db81@mail.gmail.com> <4777A16D.9090309@gentoo.org> <1199101450.20679.6.camel@localhost.localdomain> In-Reply-To: <1199101450.20679.6.camel@localhost.localdomain> X-Enigmail-Version: 0.95.5 OpenPGP: id=9CCF4998 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1765B5A77316AA1BBA5A3173" Subject: Re: [PHP-DEV] bad test case that depends on user local ini From: hoffie@gentoo.org (Christian Hoffmann) --------------enig1765B5A77316AA1BBA5A3173 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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 migh= t >> be better, as such you turn off zts for the new build as you don't nee= d >> 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 obvio= us >> reasons. >=20 > 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. --=20 Christian Hoffmann --------------enig1765B5A77316AA1BBA5A3173 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkd49HIACgkQJ9KLJlGHWYI/DQCfQ5wiHn0CCccJwFzPbEQ7JII3 /cwAoKmbqQ+mIT4N4kecfoCV83mNlJcb =KXTF -----END PGP SIGNATURE----- --------------enig1765B5A77316AA1BBA5A3173--