#30228 [WFx]: PHP5 and PHP4 run together on a single Apache virtual server

From: Date: Wed, 27 Oct 2004 12:22:04 +0000
Subject: #30228 [WFx]: PHP5 and PHP4 run together on a single Apache virtual server
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68386@lists.php.net to get a copy of this message
ID: 30228 User updated by: zizka at seznam dot cz Reported By: zizka at seznam dot cz Status: Wont fix Bug Type: *Configuration Issues Operating System: Windows 2000 PHP Version: 5.0.1 New Comment: It's bad when somebody spams this page, but it's also bad not to answer correctly. Please tell me about some concrete mailing list thread. I've tried to find, but didn't find anything (don't ask why :) . Previous Comments: ------------------------------------------------------------------------ [2004-10-01 21:27:11] sniper@php.net Won't happen, don't ask why. (you can try reading the mailing list archives..) ------------------------------------------------------------------------ [2004-09-25 01:38:03] zizka at seznam dot cz 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 this bug report at http://bugs.php.net/?id=30228&edit=1

« previous php.bugs (#68386) next »