|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-01 21:27 UTC] sniper@php.net
[2004-10-27 14:21 UTC] zizka at seznam dot cz
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
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.