How to have multiple php version in one machine

Posted on 2006-04-09
Last Modified: 2006-11-18
Our net administrator currently has php 4.1.2 installed. I want to add some contents which require php 4.3+ version. Provide our administrator cannot upgrade for me, how can I have two php version installed in the same machine ***without*** bringing any negative effects to existed websites (they work properly in php 4.1.2).

Our admin told me the include_path of our php.ini is:

include_path = ".;f:\php42\includes;f:\php42\pear"

and php.ini is in C:\WINNT\system32\.

Question by:tiger0516
    1 Comment
    LVL 5

    Accepted Solution

    I think you'll need some help from your admin on this, but you can install PHP 4.3 in a separate folder, and use CGI invocation.  Also, the setup depends on your web server, which you didn't specify.

    Install PHP 4.3 in f:\php43
    In f:\php43\php.ini, set your include path to ".;f:\php42\includes;f:\php43\pear", etc
    Configure the web server's virtual host for your domain name to run .PHP files as CGI scripts using f:\php43\php.exe

    If you aren't using virtual hosts, then you'll have to name your scripts something else (like .PHP43), and use CGI based on that extension.  I don't recommend this as you will have a hard time hosting on other servers, which surely won't know about the .PHP43 extension.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to count occurrences of each item in an array.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now