Programming Tutorials

Running different websites on different versions of PHP in Windows 2003 & IIS6 platform

By: Donald in PHP Tutorials on 2011-03-26  

On the Windows 2003 & IIS6 platform, you can run different websites on different versions & copies of PHP. This is useful in at least two cases:

1. You want one website on your box to have register_globals on, but since you're running IIS, you cannot specify that in an .htaccess file. And you definately don't want register_globals on for the rest of the websites.
2. You want to run different versions of PHP for different websites, or even just different extensions. Say you wanted one site to use 4.0.5 and a different site to use 4.1.11.

Its simple, just:
1. Move your php.ini file from your c:\windows\ directory directly to your php directory (by default that would be c:\php\)
2. Make sure you don't have a php.ini file in any other location that would supercede the c:\php\php.ini file. Using phpinfo(); is useful here.
3. Have your alternate version of php (either a different version or a different php.ini) have its own install directory, like c:\php4RG\ or c:\php405\.
4. In the Home Directory Configuration for your website, specify the .php extension to use a different script, pointing it at the alternate directory.






Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in PHP )

PHP code to write to a CSV file from MySQL query

Different versions of PHP - History and evolution of PHP

PHP code to import from CSV file to MySQL

Encrypting files using GnuPG (GPG) via PHP

Send push notifications using Expo tokens in PHP

PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/php4/lib/php/extensions/no-debug ......

Decrypting files using GnuPG (GPG) via PHP

A Basic Example using PHP in AWS (Amazon Web Services)

Error: Length parameter must be greater than 0

Parent: child process exited with status 3221225477 -- Restarting

Password must include both numeric and alphabetic characters - Magento

Count occurrences of a character in a String in PHP

Convert a hex string into a 32-bit IEEE 754 float number in PHP

Reading word by word from a file in PHP

PHP file upload prompts authentication for anonymous users

Latest Articles (in PHP)