php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30228 PHP5 and PHP4 run together on a single Apache virtual server
Submitted: 2004-09-25 01:38 UTC Modified: 2004-10-27 14:21 UTC
Votes:14
Avg. Score:4.8 ± 0.4
Reproduced:11 of 14 (78.6%)
Same Version:8 (72.7%)
Same OS:6 (54.5%)
From: zizka at seznam dot cz Assigned:
Status: Wont fix Package: *Configuration Issues
PHP Version: 5.0.1 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zizka at seznam dot cz
New email:
PHP Version: OS:

 

 [2004-09-25 01:38 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-01 21:27 UTC] sniper@php.net
Won't happen, don't ask why. (you can try reading the mailing list archives..)

 [2004-10-27 14:21 UTC] zizka at seznam dot cz
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 :) .
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC