How to have multiple php version in one machine

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\.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.