Friday, March 14, 2014

Add a new version of PHP to Wamp Server

To Add a new version of PHP to wamp server , Say you have php5.4.3 and you want to add a new version php5.5.8.

You have to follow these steps to be assure that you can run the new version in your wamp server :

 1. Copy the new php version folder to the php folder in Wamp/bin folder .
                       Example :
                                Wamp/bin/php/
                                                      /php5.4.3
                                                      /php5.5.8

  (Note: the first number must be attached directly to php, no space no dots) .

2.Create a new file and name it wampserver.conf in the new php folder(php5.5.8) .

 3.Copy the content of the wampserver.conf that reside in the last php version (php5.4.3) to the wampserver.conf of the new php version(php5.5.8).

4.make a copy of php.ini file in the new php version(5.5.8) folder and name it phpForApache.ini .

5. (if it is not Exist)Add the following  line to the new  phpForApache.ini :

        extension_dir = "d:/wamp/bin/php/php5.5.8/ext/" .

6. Add the following line to the end of the LoadModule section in httpd.conf file which reside in wamp/bin/apache/apache2.4.*/:

 LoadModule php5_module "d:/wamp/bin/php/php5.5.8/php5apache.dll".

 7.Also add the following  line :

;AddModule php5

(Note: these two line will be replaced by the contents in the wampserver.conf variables ,So it is not important what is written here as long as the line contain the two words "LoadModule" and "php" or "AddModule" and "php").

No comments:

Post a Comment