From: zizka at seznam dot cz
Operating system: Windows 2000
PHP version: 5.0.1
PHP Bug Type: *Configuration Issues
Bug description: PHP5 and PHP4 run together on a single Apache virtual server
Description:
------------
I need to have PHP4 and PHP5 running together on a single Apache virtual
server as SAPI modules. Don't ask why.
With every new PHP's main version (4,5) it becomes harder to have the new
version running with the old one.
I use .php3, .php4, and .php5 exts; .php is for my currently favorite
version. Since the PHP3 had "application/x-httpd-php3" as the Action
handler, setting application/x-httpd-php for PHP4 was not a problem. But
as PHP5 uses the same, it's quite difficult.
I changed this string in the php5apache.dll file and configured Apache
1.3:
# PHP 4
LoadModule php4_module "c:/program files/php436/sapi/php4apache.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4
# PHP 5
LoadModule php5_module "c:/program files/php5/php5apache.dll"
AddType application/x-httpd-ph5 .php5
SetEnv PHPRC "c:/php.ini"
This works, but the problem is with php.ini. PHP seems not to be willing
to load it from anywhere else than WINNT directory. I tried every way
documented, but only one works, and only for PHP5:
* PHPIniDir directive (Apache 2 module only) -- I need Apache 1.3
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath -- Works for PHP5 only
* Apache's SetEnv PHPRC "c:/" -- Doesn't work at all, I
tried \ and \\ too
* The PHPRC environment variable -- Doesn't work at all
* PHP's dir (for CLI) or server's dir (SAPI) -- I need to set different
for 4 and 5
* Windows directory (C:\windows or C:\winnt) -- I need to set different
for 4 and 5
There's also one bug - the first request to PHP version, other than the
server's first PHP request used, keeps hanging until the server shutdown.
Further are ok.
Reproduce code:
---------------
The Apache's conf is above.
Expected result:
----------------
I would like this to be done:
First, update the documentation to reflect the real state of things; I
mean the php.ini location process.
Second, don't unify the important strings like Apache Action name
(application/x-httpd-php) and env vars (like PHPRC).
Instead, use different for every main version number
(application/x-httpd-php5, PHP5_RC).
Third, do it generally more possible to have concurent versions running on
the same virtual server.
--
Edit bug report at http://bugs.php.net/?id=30228&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30228&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30228&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30228&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30228&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30228&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30228&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30228&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30228&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30228&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30228&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30228&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30228&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30228&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30228&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30228&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30228&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30228&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30228&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30228&r=mysqlcfg