Can't switch between versions, can't switch back
Posted by: DaveSpain (88.148.50.---)
Date: September 13, 2013 10:57AM

Hi. I have been having trouble with a production site that seems to be linked to the PHP version. I have downloaded and installed some earlier versions of MySQL, PHP and APACHE to try to bug hunt on the development site, but none of the versions seem to work together and I cannot switch back to the original installed versions Apache 2.4.4, PHP 5.4.16 and MySQL 5.6.12 (Yes, I was very careful about which versions of which I downloaded). Either the option will not allow the switch or WAMPserver doesn't work at all with the new configuration (Orange icon). Manually removing all the other options from the bin folder leaves me with MySQL and PHP selected correctly, but says these versions oare not compatible with the version of Apache. Manually editiong the HTTPconf file to show the correct paths makes no difference.

Can anyone tell me what has gone wrong?

Sorry, running Windows 7 Professional 32 bit, 2GB RAM (Old and worn out, like me sad smiley )

Thanks

Dave



Edited 1 time(s). Last edit at 09/13/2013 10:59AM by DaveSpain.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: stevenmartin99 (Moderator)
Date: September 13, 2013 11:16AM

Try edit the wampmanager.conf

Make sure all versions mentioned actually exist.

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

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: RiggsFolly (---.as13285.net)
Date: September 13, 2013 01:58PM

The file Steven is talking about is this one.

\wamp\bin\php\phpX.Y.Z\wampmanager.conf.

It should exist in each of the folders containing versions of PHP.
It tells wampmanager what PHP interpreter to load depending on which version of apache you have running.

Wamp 2.4 seems to have been delivered without these lines in the php5.4.16 directory:

$phpConf['apache']['2.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4']['AddModule'] =  '';

Check each version of PHP you have loaded and amend this fiule accordingly, but remember to check that that version of PHP actually has the dll mentioned i.e. php5apache2_2.dll or php5apache2_3.dll actually in the directory to be loaded.

Once this is corrected the version switching mechanism will work.

Also remember you may have to switch in stages, as it can only switch php versions if that version of PHP will run in the version of Apache that is currently selected.
Use the NO-ENTRY symbols to work out which versions of PHP will run with which version of Apache.

<?php

$phpConf['phpIniDir'] = '.';
$phpConf['phpExeDir'] = '.';
$phpConf['phpConfFile'] = 'php.ini';


$phpConf['apache']['1.3']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['1.3']['LoadModuleFile'] = 'php5apache.dll';
$phpConf['apache']['1.3']['AddModule'] =  'mod_php5.c';

$phpConf['apache']['2.0']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.0']['LoadModuleFile'] = 'php5apache2.dll';
$phpConf['apache']['2.0']['AddModule'] =  '';

$phpConf['apache']['2.2']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.2']['LoadModuleFile'] = 'php5apache2_2.dll';
$phpConf['apache']['2.2']['AddModule'] =  '';

$phpConf['apache']['2.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4']['AddModule'] =  '';

?>



Edited 1 time(s). Last edit at 09/14/2013 09:40AM by RiggsFolly.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: stevenmartin99 (Moderator)
Date: September 14, 2013 08:52AM

I was actually talking about

C:/wamp/wampmanager.conf


If you just delete versions without being able to I select them, they will still be in this file as the current or previous versions.

This file is used to build the selected versions on the menu

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

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: DaveSpain (88.148.50.---)
Date: September 16, 2013 06:08PM

Thanks guys, but you might as well be speaking a foreign language. I have looked through the C;/wamp/wampmanager file and both versions of php I have loaded are listed and I have added the patch to the \wamp\bin\php\phpX.Y.Z\wampmanager.conf. file. I have no idea what else I should be looking for, except that the .dll file mentioned appeear to be there

Currently, I have loaded Apache 2.2.4 and 2.4.4, php 5.2.9 and 5.4.16 and MySQL 5.1.41 and 5.6.12. The original installation was Apache 2.4.4, php 5.4.16 and MySQL 5.6.12 and worked fine, except that an old web site built in Jommla!1.5 wouldn't work, hence the hunt for a legacy version that would.

The current problem is that it will allow me to select any version of MySQL with any version of Apache, but stays at the orange icon. I can't select php 5.4.16 with any combination and it stays on 5.2.9.

Any further comments appreciated.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: RiggsFolly (---.as13285.net)
Date: September 16, 2013 11:07PM

Ok I will try to explain better what the problem is:

Basically the jump from PHP 5.4.16 to PHP 5.2.9 is to large. You need a version of PHP ( suggest 5.3.22 ) in the middle to step from 5.4.16 to 5.3.22 and then to 5.2.9

You may also need an intermediate version of apache ( suggest 2.3.22 ) as another stepping stone.

Why I hear you screen

To put it simply,
PHP5.2.9 wont run with Apache 2.4.4 so when you try and switch php versions apache fails to start, and
and PHP5.4.16 wont run with Apache 2.2.4 so the same problem happens in reverse.

Once you get into a situation where apache wont start then everything stops working.

I hope this explains the situation better.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: DaveSpain (88.148.50.---)
Date: September 17, 2013 11:47AM

Thanks RiggsFolly, however, this brings to light a different problem

Neither PHP 5.3.22 nor Apache 2.3.22 are available from the WAMPServer download lists (no 2.3.x versions are listed.) I have tried the most recent PHP available, PHP 5.3.1 and already had the most recent Apache on that list, 2.2.4 and it makes no difference at all. I m not up to hand-grafting versions into the program.

Basically, I still can't switch from Apache 2.2.4 to 2.4.4, presumably because I can't switch from PHP 5.2.9 or 5.3.1 to 5.4.16, although I can switch from 5.2.9 to 5.3.1, but Apache is quite resolute about not switching from 2.2.4 and the tray icon remains persistently orange. I can switch between MySQL 5.1.41 and 5.6.12, but I suspect that this information is of little use.

On the initial installation, everything worked. When I changed down to PHP 5.2.9 and Apache 2.2.4, everything worked. I wasn't until I tried to change back to the original installation settings that everything stopped, so I still don't see how that the step size could have been too big as it worked downwards.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: RiggsFolly (---.as13285.net)
Date: September 17, 2013 11:45PM

Ignore Apache 2.3.x, it never really existed. Basically it went from 2.2.x to 2.4.x for some reason.

Try installing Apache 2.2.14, that should run both PHP5.2.9 and PHP5.4.16

You can find it in the Apache Addons list on www.wampserver.com/en/

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: DaveSpain (88.148.50.---)
Date: September 18, 2013 02:36PM

I can select Apache 2.2.14 or 2.2.4 or with PHP 5.2.9 or 5.3.1 but I can't select 5.4.16 with any version of Apache. Apache 2.4.4. will only work with PHP 5..2.9 although it installed with 5.4.16. None of the combinations I have available gives me a green tray Icon.

Very many thanks for your help guys, but I really can't spare any more time on this, so will try XAMPP instead. I would not be suprised to learn that Microsoft is to blame here.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: RiggsFolly (---.as13285.net)
Date: September 18, 2013 03:18PM

No its some issues with WAMPServer 2.4


If you like

Install TeamViewer and I will troubleshoot for you.

Install TV, then run it.

Do this before attempting a connection.

How to Configure Team Viewer so it does not require port 80 or 443

Run TV
Extras -> Options -> Advanced -> Press the Advanced Button -> Advanced Network Connections

Check the checkbox saying [ Dont use incomming port 80 (recommended for web servers only ) ]
Stop and restart TV.

Then
Send me a Private Message containing the TV ID and PASSWORD so I can connect.
Leave TV running as it will change the password each time you restart it.

I am on UK time (GMT+1) and am normally available 09:00 - 16:00 and sometimes later into the evening.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: MarkLL (---.static.internode.on.net)
Date: September 19, 2013 05:26PM

It seems confusing when you read RiggsFolly's instructions, but I concur with what he says smiling smiley

I recently had to upgrade my PC which was running wamp 1!

Took a bit of figuring out but I now have the following options:

Apache: 2.2.4, 2.4.4 & 2.4.6
PHP 5.2.4, 5.4.16, 5.4.19 and 5.5.3
MySQL 5.0.45 and 5.6.12

It takes 2 "hops" to go from php 5.2.4 (from wamp1) to 5.5.3 with a switch from Apache 2.2.4 -> 2.4.4 -> 2.4.6 but I'm happy that all my old code and original databases still work smiling smiley

Apache 2.4.6 and php 5.4.19 and 5.5.3 I added manually from a recent update downloaded from the official sites. php 5.4.19 works ok with the apache 2.4.4 that I installed from wamp 2.4 (32 bit)

php 5.4.16 from wamp 2.4 - the transition version - works ok with all three apache versions so enables me to load the old php 5.2.4 from wamp 1.

My wampserver.conf for 5.4.16 looks like:

<?php

$phpConf['phpIniDir'] = '.';
$phpConf['phpExeDir'] = '.';
$phpConf['phpConfFile'] = 'php.ini';

$phpConf['apache']['2.2.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.2.4']['LoadModuleFile'] = 'php5apache2_2.dll';
$phpConf['apache']['2.2.4']['AddModule'] =  '';

$phpConf['apache']['2.4.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4.4']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4.4']['AddModule'] =  '';

$phpConf['apache']['2.4.6']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4.6']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4.6']['AddModule'] =  '';

?>

php 5.4.19 works with apache 2.4.4 (from wamp 2.4) and 2.4.6 so the wampserver.conf looks like:

<?php

$phpConf['phpIniDir'] = '.';
$phpConf['phpExeDir'] = '.';
$phpConf['phpConfFile'] = 'php.ini';

$phpConf['apache']['2.4.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4.4']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4.4']['AddModule'] =  '';

$phpConf['apache']['2.4.6']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4.6']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4.6']['AddModule'] =  '';

?>

And php 5.5.3 only works with apache 2.4.6 (both VC11 builds) so the wampserver.conf looks like:

<?php

$phpConf['phpIniDir'] = '.';
$phpConf['phpExeDir'] = '.';
$phpConf['phpConfFile'] = 'php.ini';

$phpConf['apache']['2.4.6']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4.6']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4.6']['AddModule'] =  '';

?>

Just checked and now there is php 5.5.4 and 5.4.20 *sigh*... I think I'll skip that for now LOL

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: RiggsFolly (---.as13285.net)
Date: September 19, 2013 05:59PM

Mark,

Hope that was a typo but if not you have made a few mistakes there!

The wampmanager.conf file should look like this
<?php

$phpConf['phpIniDir'] = '.';
$phpConf['phpExeDir'] = '.';
$phpConf['phpConfFile'] = 'php.ini';

$phpConf['apache']['2.2']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.2']['LoadModuleFile'] = 'php5apache2_2.dll';
$phpConf['apache']['2.2']['AddModule'] =  '';

$phpConf['apache']['2.4']['LoadModuleName'] = 'php5_module';
$phpConf['apache']['2.4']['LoadModuleFile'] = 'php5apache2_4.dll';
$phpConf['apache']['2.4']['AddModule'] =  '';

?>


You only need to use '2.2' and '2.4' as the key to that array and not '2.4.4' and '2.4.6'

The idea with this file is to tell wampmanager that if it is running
Apache 2.2.x it should get the file called php5apache2_2.dll for the interpreter from the phpx.y.z file
or if we are running
Apache 2.4.x it should use the file called php5apache2_4.dll for the interpreter from the phpx.y.z file

The version of the PHP interpreter is denoted by its existance in the specific php.x.y.z file

So for example the PHP5 interpereter that runs with Apache 2.4.x will always be called php5apache2_4.dll

So when you are running Apache 2.4.x
and switch to PHP5.4.16 wampmanager will edit the httpd.conf file for Apache2.4.x to load the php interperter module from \wamp\bin\php\php5.4.16\php5apache2_4.dll

And when you switch the php version again to PHP5.5.3 wampmanager will edit the httpd.conf file for Apache2.4.x to load the php interperter module from \wamp\bin\php\php5.5.3\php5apache2_4.dll

Of course this helps to see where the problem is when trying to switch to lets say php5.2.9 when running Apache2.4.x, because there is no php5apache2_4.dll in the php5.2.9 folder. Because Apache 2.4 was not invented when php5.2.9 was built.


Its all to do with the fact that occasionally Apache change the linkages between itself and its modules. thats why there is no php5apache2_3.dll anywhere, because the linkages stayed the same between Apache2.2 and Apache2.3 so the php5apache2_2.dll worked with Apache2.2 and Apache2.3



I hope this makes it a little clearer for somebody.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: MarkLL (---.static.internode.on.net)
Date: September 19, 2013 06:22PM

Hi RiggsFolly,

Actually there were No typo's.

Adding the third digit as in [2.4.6] is how the tray menu prevents you from trying to load Apache 2.4.4 with php 5.5.3 which does not work.

I understand your point re Apache 2.2 and php 5.3, but I'm using either of those.

Don't get me wrong I love WAMPServer and appreciate all the work you guys have done, But I really wanted to keep my Wamp 1 versions and try php 5.5 which needed to use Apache 2.4.6 with VC11.

Obviously I created the appropriate apache\Apache2.2.4 and Apache2.2.6 folders as well as php\php5.2.4 and php5.5.3 folders and after figuring out how it all worked implemented what I described above.

Obviously it's an advanced setup and not for the novice, but it does work.

Cheers,
Mark



Edited 1 time(s). Last edit at 09/19/2013 06:28PM by MarkLL.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: stevenmartin99 (Moderator)
Date: September 19, 2013 06:27PM

I think Riggs is right tho

There is no need to have z in x.y.z as the dll will only ever need to match y

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

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: MarkLL (---.static.internode.on.net)
Date: September 19, 2013 06:36PM

stevenmartin99 Wrote:
-------------------------------------------------------
> I think Riggs is right tho
>
> There is no need to have z in x.y.z as the dll
> will only ever need to match y

As I said, it's all to do with preventing loading Apache 2.4.4 and Php 5.5.3. If I used 2.4, then I could attempt to load Apache 2.4.4 and 5.5.3 which are not compatible because Apache 2.4.4 is VC10 - from wampserver 2.4 - and php 5.5.3 is VC11 - from windows.php.net.

Obviously you have the option of discarding my posts as that of a raving lunatic, but I'm just trying to offer my recent experience.

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: stevenmartin99 (Moderator)
Date: September 19, 2013 06:41PM

Oh I understand - I did the same thing but I added

Vc6 vc9 etc to the end of the folder names just to keep it all the same

In fact I think I use .vc6. And rewrote the function that chops of the last .z so that it compares the vc buildsmiling smiley

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

Options: ReplyQuote
Re: Can't switch between versions, can't switch back
Posted by: MarkLL (---.static.internode.on.net)
Date: September 19, 2013 06:50PM

Phew... I'm glad you see what I was doing...

Hadn't thought of adding the vc version, not a bad idea smiling smiley


The interesting thing is that Apache 2.4.6 (vc11) supports php vc11 and vc10 builds (and maybe vc9 as well, not sure).

Also, I did't have to edit *any* of the scripts. (not counting onlineOffline.php which I changed to use PHP_EOL when investigating the on/off line issue)

Options: ReplyQuote


Sorry, only registered users may post in this forum.