php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46447 existing installation doesn't allow testing of new version
Submitted: 2008-11-01 03:11 UTC Modified: 2008-11-06 01:23 UTC
From: hostmaster at uuism dot net Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.2.6 OS: Fedora Core 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hostmaster at uuism dot net
New email:
PHP Version: OS:

 

 [2008-11-01 03:11 UTC] hostmaster at uuism dot net
Description:
------------
In the README.TESTING file, it indicates:

"[Which php.ini is used]
-----------------------
 "make test" uses the same php.ini file as it would once installed.
The tests have been written to be independent of that php.ini file,
so if you find a test that is affected by a setting, please report
this, so we can address the issue."

However, I have PHP-5.0.4 installed on the same system that I am testing PHP-5.2.6.  The /etc/php.ini file for PHP-5.0.4 contains the statement:

extension_dir = "/usr/lib/php/modules"

When I execute run-tests.php, it reads /etc/php.ini and loads the modules from the old directory, rather than /usr/lib/20060613.

I found that I could create a new php.ini file in sapi/cli/ and it will be used by run-tests.php.  However, the README.TESTING file does not indicate that this step is needed.

Also, sapi/cli/php determines which modules to load based on the INI files in /etc/php.d.  Since different modules are shared, I get errors that modules have been loaded twice.

I tried using the syntax in the README.TESTING file:

TEST_PHP_EXECUTABLE=sapi/cli/php \
sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB]

I tried creating a new directory /etc-5.2.6 for my php.ini file and php.d directory.

However, this command did not work:

TEST_PHP_EXECUTABLE=sapi/cli/php \
sapi/cli/php -c /etc-5.2.6 run-tests.php /path/to/tests/

It ignored the "-c /etc-5.2.6" part entirely.  This parameter works for the compiled php executable, not for the test scripts that are run by run-tests.php.

I found that I had to configure php with --with-config-file-path=/etc-5.2.6 and --with-config-file-scan-dir=/etc-5.2.6/php.d.  I placed the new php.ini in directory /etc-5.2.6 and placed the INI files in this new directory /etc-5.2.6/php.d.

Jim











Reproduce code:
---------------
NA

Expected result:
----------------
NA

Actual result:
--------------
NA

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-04 16:34 UTC] vrana@php.net
README.TESTING is not part of a documentation.
 [2008-11-05 05:06 UTC] hostmaster at uuism dot net
okay. this is a problem with compilation, i guess.

jim
 [2008-11-06 01:23 UTC] jani@php.net
This is basic knowledge that can be found in the manual. No README 
can ever (and should not) contain every single piece of information.

Please, if you don't know what you're doing, ask on the mailing lists 
instead of spamming this bug database.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 13:01:31 2024 UTC