I'd like to ask if we can install an older version of PHP in WAMP that is not available through an add-on setup, that WampServer provides. PHP 5.2.17 for example! Upgrade wamp from PHP 5.5 to 5.6 - WAMP is yellow. With a compatible compiler for 5.5 is no longer compatible with the compiler version used by 5.6 – RiggsFolly. In my, I said that I like having a development environment on my computer (running Windows 7). I use to do this. I especially like that WampServer allows you to have multiple versions of php (and MySQL and Apache) installed. You can switch between versions in the WampServer menu on the icon in the system tray. The server that an upcoming client project will be hosted on will be running php version 5.2.14. That version isn’t available for download on the WampServer website, but that doesn’t mean that I’m out of luck. I decided to manually install php to see if I could get it running, and I succeeded. I wanted to share my process so that you can do it to (and so that I know what I need to do if I have to install another version that isn’t available on WampServer). Download the php windows binaries There are 2 sources for the binaries, and. Wamp Server 2 DownloadI recommend downloading the files from windows.php.net because they are more up-to-date. I ran into an issue where the cURL extension wouldn’t load. It turns out the php team made some changes to the php_curl.dll file to correct those issues. The download on php.net doesn’t include those changes (it’s an older version). No matter which source you choose to download the binaries from, download the zip package. Extract the contents of the zip file to C:/wamp/bin/php/php5.2.14 (change the path to reflect where you have WampServer installed and the version number to whatever version you are installing). Modify the php.ini file You need to make some changes to the php.ini file in order for it to work with WampServer. NOTE: You will need to modify the paths to reflect where your installation of WampServer is (mine is in C:/wamp). You will also have to modify the extension_dir if you are installing a version other than 5.2.14. Wamp Php Download![]() The following lines indicate the changes you will need to make. Just do a search to find where in the file the lines are so you can make the changes (I noticed that the line numbers vary between php versions, so I didn’t include them here).; Log errors to specified file. Error_log = c:/wamp/logs/php_error.log; Directory in which the loadable extensions (modules) reside. Extension_dir = 'c:/wamp/bin/php/php5.2.14/ext/'; Temporary directory for HTTP uploaded files (will use system default if not; specified). Upload_tmp_dir = 'c:/wamp/tmp'; where MODE is the octal representation of the mode. Wamp Php 5.2.17Note that this; does not overwrite the process's umask. Session.save_path = 'c:/wamp/tmp' You will also want to enable/disable any extensions that you need for your application(s). Once you have completed your changes to the php.ini file, you will need to save a copy of the file with the filename of phpForApache.ini (in the same directory as the php.ini file). You must do this in order for WampServer to use the new version. WampServer copies this file to the Apache server when you select the version from the menu. Wamp Php DownloadModify the WampServer configuration If you already have WampServer running with another version of php, copy the wampserver.conf file from that version into your newly installed version. If you don’t have another version running, paste the following code into a file and save it in the directory that you extracted the php files to. $phpConf['phpIniDir'] = '.' ; $phpConf['phpExeDir'] = '.' No you will have to do that one manually. Heres a tutorial on how to do that. Beware that you may need to install an old apache as well as you will need an apache compiled with VC6 as php 5.2.17 will almost definitely have been compiled with that. Before you start On Apache and PHP you will see the acronym VC6 and VC9. This denotes the compiler version used to compile that program or dll. ![]() It stands for Visual C V6 or Visual C V9. Unfortunately you cannot mix the two when it comes to Apache and PHP. So first you must find out which compiler was used to compile the Apache you are currently using, so you can get the PHP that was compiled with the same version of the compiler. The way PHP and Apache interact in the default WAMPServer install is that Apache launches the PHP Interpereter as a dll (php5apachex_y.dll) as this is a very close relationship i.e. Not communication via a TCP port like PHP and MySQL, so they both have to have been compiled using the same version of Microsoft Visual C Compiler. From WampManager 'Stop All Services'. Download the PHP Release you want to install from www.php.net/download You should use the Thread Safe build. Make sure its built with the same compiler versions as you Apache ( VC6 or VC9 ) 3. Create a new folder under c: wamp bin php with the name = the version you are installing So make a folder called php5.5.11 for example.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2018
Categories |