PHP 5.3.x and 5.4.x together
Posted by: simPod (---.32.broadband3.iol.cz)
Date: December 07, 2013 10:41PM

Hello, have anyone found out a way how to have WAMP installed with PHP 5.4.x and 5.3.x together? Thanks.

Options: ReplyQuote
Re: PHP 5.3.x and 5.4.x together
Posted by: stevenmartin99 (Moderator)
Date: December 07, 2013 10:53PM

do you mean running at the same time?


I was asked this a while back with php 4 and php5 and it wasn't possible then , but now its possible with apache supporting the correct directives.

you will need to use vhosts to specify the php version you want to use, if you haven't used vhosts before, read up on these first to enable them in wamp.

Then you will want the following...

<VirtualHost *:80>
DocumentRoot "c:/wamp/www/site1"
ServerName site1
LoadModule php5_module "c:/wamp/bin/php/php5.4.x/php5apache2_2.dll"
PHPIniDir "c:/wamp/bin/apache/apache/2.2.x/bin"
php_value extension_dir "c:/wamp/bin/php/php5.4.x/ext"
AddType application/x-httpd-php .php
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "c:/wamp/www/site2"
ServerName site2
LoadModule php5_module "c:/wamp/bin/php/php5.3.x/php5apache2_2.dll"
PHPIniDir "c:/wamp/bin/apache/apache/2.2.x/bin"
php_value extension_dir "c:/wamp/bin/php/php5.3.x/ext"
AddType application/x-httpd-php .php
</VirtualHost>



Replace x with your exact version numbers of apache and php.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 12/07/2013 10:54PM by stevenmartin99.

Options: ReplyQuote
Re: PHP 5.3.x and 5.4.x together
Posted by: simPod (---.32.broadband3.iol.cz)
Date: December 07, 2013 11:00PM

No, I meant like to have WAMP installed with both and switch between them, now I can't, see [i.imgur.com] It looks like 5.3 wont work with WAMP 2.4 and vice versa

Options: ReplyQuote
Re: PHP 5.3.x and 5.4.x together
Posted by: stevenmartin99 (Moderator)
Date: December 07, 2013 11:02PM

Maybe you install wamp 64 bit , and then tried to use a 32bit php addon?
stick to all x32 86

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP 5.3.x and 5.4.x together
Posted by: simPod (---.32.broadband3.iol.cz)
Date: December 07, 2013 11:14PM

no, all I installed is x86. It's weird

Options: ReplyQuote
Re: PHP 5.3.x and 5.4.x together
Posted by: stevenmartin99 (Moderator)
Date: December 07, 2013 11:21PM

most likely you have enabled some extension that doesnt exist in the version, or the apache version is not compatiable with that version,

you can force it to override into that version.

Shut down wamp.

open c:\wamp\wampmanager.conf

change php versions to the one you want to use.

[php]
phpVersion = "5.4.3" change this
phpLastKnown = 5.4.3 change this


open apaches conf file and change the version number to match this one also, i think its

LoadModule php5_module "c:/Wamp/bin/php/php5.4.3/php5apache2_4.dll" change this


if this then fails to start and you get orange icon, check the apache and php error logs and you will find out why its not working , just as on the menu

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 2 time(s). Last edit at 12/07/2013 11:23PM by stevenmartin99.

Options: ReplyQuote
Re: PHP 5.3.x and 5.4.x together
Posted by: simPod (---.32.broadband3.iol.cz)
Date: December 07, 2013 11:31PM

I get orange icon but those logs are empty smiling smiley Would it help if I completely remove wamp and all the files and reinstall?

Options: ReplyQuote
Re: PHP 5.3.x and 5.4.x together
Posted by: stevenmartin99 (Moderator)
Date: December 07, 2013 11:48PM

maybe if you got teamviewer i could take a look

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.