15

A fresh download and install of WAMP Server works successfully (Apache 2.4.4 PHP 5.4.12).

However as soon as I install a different version of Apache, in this case 2.4 to 2.0 (so I can run PHP 5.2 & 5.4), WAMP goes offline with an orange icon.

If I try to switch BACK to the original Apache version I get this show-stopping error:

Sorry,

This Apache version doesn't seem to be compatible with your actual PHP Version.
Switch cancelled.
Press ENTER to continue...

This doesn't make any sense, as this is a fresh install so both the Apache + PHP versions are the defaults.

Here's what the UI is telling me:

  • The WAMP icon is now orange
  • the Apache/Version/2.4.4 icon has a red warning icon next to it
  • the Apache/Version/2.0.63 icon has a tick next to it

I've tried installing other versions of Apache too, but the issue seems to be with the base 2.4 WAMP installed options.

Extra info: port 80 is free, and I used to use WS 2.0e all the time without these kinds of issues.

Thanks, Dave

davestewart
  • 705
  • 1
  • 8
  • 11
  • I have run into problems switching versions like this as well. My only advice is to stop all services before you switch and make sure the versions you select are compatible with each other before you start up again. – Sarah Kemp Sep 09 '13 at 19:11

6 Answers6

17

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

Edit wampmanager.conf via Notepad++

Add This Codes.. And Save wampmanager.conf

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

Restart Wamp Manager..

Mahmut Duman
  • 407
  • 1
  • 5
  • 12
10

just had a similar problem - was upgrading WAMP from Apache 2.2 / PHP 5.3 to Apache 2.4 / PHP 5.4

This is what worked for me:

  • Stop apache service
  • Remove the unwanted version's apache service using WAMP manager's 'Remove service' option. (check in Windows services if really removed)
  • Manually edit the 'wampmanager.conf' in the WAMP's installation directory to use Apache and PHP versions you want to use (sections: 'php', 'phpCli' and 'apache' / properties 'xVersion' and 'xLastKnown')
  • Shutdown WAMP manager
  • (Re)Start WAMP manager
  • (Re)Install the wanted version's apache service using WAMP manager's 'Install service' option. (check in Windows services if really installed)
  • (Re)Start apache service

NOTE: Always run WAMP manager as admin

... After this phpinfo() shows new Apache and PHP versions and seems to work fine. Hope it helps.

ofzza
  • 2,701
  • 1
  • 11
  • 5
  • 2
    This didn't work for me, so eventually I just ran the apache.exe from the command line, and it said there were syntax errors in the supplied .conf files in c:\wamp\alias\ folder. Removing the "allow from ::1" in each of these files allowed apache to run. I can now switch PHP versions from 5.2 to 5.3 but none of the apache versions will allow me to switch to 5.4. Looking on the WAMPServer page it doesn't have download links for 5.4, so I can only guess that it isn't supported yet? Saying that, I downloaded apache 2.4.0, added a wampserver.conf file to the folder, and that didn't work either. – davestewart Sep 11 '13 at 12:21
  • Worked for me! Followed guide https://dhali.com/wordpress/upgrade-wamp-server-php-7/ and then modified root wampmanager.conf to correct versions and all working. – Sean Mar 15 '20 at 10:51
5

The problem is WAMP version 2.4. I don't know why but v2.4 is not compatible with addons. Then I tried 2.2E. It was fine with addons.

By the way, addons compiled for 32bit. So do not install 64bit Wamp if you think that you would use addons.

borayeris
  • 2,603
  • 1
  • 27
  • 31
4

When updating WAMP from 2.2 to 2.4 or switching from Apache 2.2.22/PHP 5.3.13 to Apache 2.4.4/PHP 5.4.12, WAMP installs new service as Apache/2.4.4 (Win64) PHP/5.3.13 to make it use PHP 5.4.12

1) Uninstall apache service
2) Modify

C:\wamp\bin\apache\Apache2.4.4\conf\httpd.conf

Change line

LoadModule php5_module "c:/wamp/bin/php/php5.3.13/php5apache2_4.dll"

to

LoadModule php5_module "c:/wamp/bin/php/php5.4.12/php5apache2_4.dll"

3) (Re)Start WAMP
4) Install Apache Service
5) Restart all services

Verify the service description of service wampapache in windows service manager to match Apache/2.4.4 (Win64) PHP/5.4.12

Ankit Sharma
  • 5,191
  • 2
  • 23
  • 29
1

I had this same issue - what I finally did was follow ofzza's and Ankit Sharma's tips, as well as manually removing the directory of the older php version while the services were stopped.

It seems to have worked, except when I call phpinfo() the top heading still claims it's the older version of php even though it's definitely running the newer one. Very strange, but everything is working so I'm fine with it.

Syntax Error
  • 4,475
  • 2
  • 22
  • 33
0

The previous installation could be part of the problem. Install WAMP 2.4 in a new directory (It comes bundled with the Apache version you want) & then migrate your www folder. Directly upgrading has not been error-free for me.

Alternatively, back-up your current version [Databases, config files & www dir], uninstall it and install the new version. Restore your information after

kakoma
  • 1,179
  • 13
  • 17