Installing a new release of WAMPServer
Posted by: RiggsFolly (---.as13285.net)
Date: May 04, 2014 06:06PM

Installing a new release of WAMPServer


If you are upgrading to WAMPServer 3 from WAMPServer 2.5 then please read WAMPServer 3 All you need to know as you can upgrade WAMPServer 2.5 to WAMPServer 3.0.3 directly insitu. And then apply the WAMPServer 3.0.8 update on top of WAMPServer 3.0.3 without any issues, and without changing the active versions of Apache/ MySQL and PHP







NEVER INSTALL A NEW RELEASE OF WAMPServer over an existing installation

You can install WAMPServer onto any disk drive ( C:, D:, etc ).

However you cannot have 2 seperate installs on 2 different drive as the services ( Apache/MySQL) will be overridden by the second install even though it in on a seperate drive!!! So you will actually be running the second install and not the first.
It is best if you install it in the root of the Disk you pick i.e. X:\wamp

Dont install it into Program Files, it will install there, but it adds unnecessary directory complexity and can cause problems as there is a space in that directory name. Remember, Apache/PHP/MySQL was ported from Unix and Unix does not like spaces in directory or filenames.


WampServer 2.5 only:
As of WampServer 2.5+ it is possible to install WampServer 32bit and WampServer 64bit at the same time on the same machine. This is because the names used for the 64bit Apache and MySQL services has been changed from the standard wampapache and wampmysql to wampapache64 and wampmysql64, so the 32bit services and the 64 bit services now have different names.

BUT DONT run them both at the same time of course as both Apache servers will still try to run on port 80 and both MySQL servers on port 3306.

However:
There is no real benefit in installing the 64bit WAMPServer over the 32bit version. In fact if you look at the PHP.NET site it warns us that 64bit PHP is infact still experimental before PHP version 7.0.0. In fact it has not yet been completely ported to full 64bit code but for PHP 7.






This is not a simple click and go process. There are a few things that can trip you up. However it is quite achievable with a bit of common sense!

Dont start this process if you only have 20 minutes to get it done, that should be all you need, but depending on your skill level and the number of releases of all 3 pieces of software you are skipping it may take longer.


=====================================================================
* Important Prerequisite about the text editor you use :

To edit the files, you must use a text editor , but not just any editor.
Some text editors, Notepad ( notepad.exe ) for example, are not able to properly view and change files with the Unix newline characters.
Other editors surreptitiously chnage these newlines, others change the character sets used or add headers;
But, it is imperative that the end of line characters used are not be altered, otherwise it will generate errors and inconsistancies.

So I highly recommend Notepad++ as a good, free text editor.
This allows use of multiple languages and will cope with all the above requirements.
You can find Notepad++ with a simple google search. (If you use a text editor such as UtraEdit, that will be fine) .

* The characters indicating the end of lines are of three types:
- Windows / DOS : CR - LF (Carriage Return - Line Feed) Two bytes 0x0D 0x0A and
- Unix : LF (Line Feed) One byte 0x0A
- Mac : CR (Carriage Return) One byte: 0x0D
=====================================================================



The process in Summary for those who consider themselves experts

1. Backup all YOUR databases in SQL format and store the backups somewhere safe.
2. Stop All Services.
3. Remove the Apache Service.
4. Remove the MySQL Service.
5. Exit WAMPServer.
6. Rename your current \wamp folder to \wamp_old (This is your backup. DONT FORGET THIS STEP)

To all intents and purpose, you have uninstalled WAMPServer now.
7. Download and Install the new WAMPServer version
(32bit is recommended, 64bit is only for geeks and 64bit PHP is fully converted to 64bit only for PHP 7 or more)

8. Change NOTHING! Check it works in its out of the box state.

Clear your browser cache ( CTRL+F5 ) to avoid any funnies with cached content.
Run localhost
Run phpMyAdmin (If asked for a Username and password; username = root / password = (nothing, leave this blank)
Run \wamp\www\testmysql.php. you will need to edit the file and change the "mysql_connect('127.0.0.1', 'root', '')"

9. If you want to bring some/all of your old versions of Apache/PHP/MySQL into the new WAMPServer
(Remember, one of the big advantages in WAMPServer is the ability to switch between versions of Apache/PHP and MySQL)

Apache: copy \wamp_old\bin\apache\apachex.y.z folder to \wamp\bin\apache\apachex.y.z

PHP: copy \wamp_old\bin\php\phpx.y.z folder to \wamp\bin\php\phpx.y.z

MYSQL: copy \wamp_old\bin\mysql\mysqlx.y.z folder to \wamp\bin\mysql\mysqlx.y.z

10. To tell WAMPServer about the old version of Apache/PHP/MySQL you just copied across run a "refresh",
right click the wampmanager icon -> Refresh
Give it a few seconds to go find all the new versions.

11. Compare your old configs with the new configs, move over any of your local change/requirements.
Remember, config parameters change between versions of Apache/PHP/MySQL !
Make sure your old changes are still required, valid, legal. ( Check the upgrade notes provided by all 3 software providers )

12. If it all goes horribly wrong. Check the bottom of this Doc to see how to unwind all these changes easily if you get problems.


The Full Instructions with useful info and helpful notes.

This whole process is based upon the fact that a WAMPServer install is basically just a copy of files onto your disk, with a little file tailoring so it knows which disk you installed it onto.
The only things that are linked to the folder you install it into are the creation of the 2 windows services 'wampapache' and 'wampmysql'. So if we remove those, and there is a menu option to do this on wampmanager, then the install is removed, without actually deleting and files.

First Backup all your databases in Format=SQL, thats your databases and not the ones that come with MySQL. Save the backups somewhere safe and readily available.
It is possible to use a MySQL utility to upgrade databases, but it is so much simpler in the long run to do a backup on your old version and a restore on your new version.

MySQL's databases are 'mysql', 'information_schema' and 'performance_schema' dont back these up, unless you know what you are doing and you know you need them.
Also you dont need the database called 'test' unless you used it for something you want to keep.

If your databases are small to medium sized you can use can use phpMyAdmin to do the backups.
If they are large and phpMyAdmin fails to back them up ( normally due to a PHP max_runtime limit ) either increase the PHP max_execution_time or you will have to backup using the mysqldump.exe. see [dev.mysql.com] for help on that.

Now if all your sites connect to their databases using 'localhost','root' and '' ( a blank password) there is nothing else to do. ( NOT A GOOD IDEA BY THE WAY )
If you set a root password and use ('localhost','root' and 'some_password_you_set' ) you just need to remember that password so you can recreate it on the new version of MySQL. ( ALSO NOT A GOOD IDEA )

However if you have done things properly and created specific MySQL users and passwords for each of your site(s) databases you are going to have to go and find out what these userids and passwords are and make a note so you can recreate them after you have restored your databses on the new version of MySQL.
Alternatively you can use phpMyAdmin to export each of your Userids as SQL statements, save these and then re-apply them to the new version of MySQL.


So now before we install the new WAMP Server

There are only 2 things that are actually installed by a WampServer installation and those are the Apache and MySQL Services.
So lets remove these 2 services.

Start WampServer
wampmanager -> Stop all Services
wampmanager -> MySQL -> Service -> Remove service
wampmanager -> Apache -> Service -> Remove service

Now stop wampmanager.
rightclick wampmanager -> Exit

Rename your existing wamp folder eg 'wamp_old'. This is your backup! Dont forget this step. It also ensures you install the new version of WAMPServer into a new \wamp folder.

Now you can install the new version of WAMP Server, so lets do that.

I stongly suggest you install a 32 bit version , even on a 64 bit Windows. The 64bit Apache and PHP on Windows are only experimental versions and are for geeks.

Download and install the new WAMP, you can install onto any drive C;, D; E; etc, install it into the root of the drive i.e. C:\wamp, but dont install into C:\Program Files\ it will but dont.

Check your new install works by:
Starting WAMP if you didnt start it automatically out of the install.
1. Check the wampmanager icon in the system tray goes GREEN.
2. Run : wampmanager -> localhost ( clear the browser cache CTRL+F5 to avoid any funnies )
3. Click on the phpMyAdmin link on this page, and check this works also.
WampServer 2.4 comes with a different phpmyadmin configuration, so it will initially load to a login page. Remember on a new install the username = root and the password is BLANK.

If you get problem with either, remember this new install does not have any of the config tailoring that you may have done to the previous release. So now would be the time to compare you old config's with the new ones and bring over anything from the old config that you need again on the new install.
Also remember you are upgrading Apache, MySQL and PHP. and parameters for all 3 of these may have changed / been added to/ or have been removed!!!!
So dont just copy them over from your old wamp to the new. THERE BE DRAGONS !!!
This is also why we dont delete the old wamp folder, until we are sure the new install is working properly.

Specifically check these files, but depending on what you have done to Apache/PHP/MySQL there may be others, only you can know this.
Make changes to these files bit by bit checking that Apache and MySQL dont report and errors between each change
https.conf,
\wamp\alias\phpmyadmin.conf,
\wamp\alias\sqlbuddy.conf,
\wamp\alias\webgrind.conf,

If you are using Apache 2.2.? make sure the Apache security looks like this:
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
plus any specific ips you may have added so you can access Apache from your network eg.
Allow from 192.168.0, will allow any ip from anywhere on your internal network.

If you installed WAMPServer 2.4
Now it a good time to read through the STICKY post [forum.wampserver.com]

If you installed WAMPServer 2.5
Now is a good time to use one of the new features and tell WAMPServer to use your editor and not notepad.exe
Edit \wamp\wampmanager.conf and change the parameter
editor = "notepad.exe" to include the full path to your editor.
Use forward slashes and not windows backslashes eg editor = "C:/program files/xxx/myeditor.exe"


Your php.ini used by Apache
(use wampmanager -> PHP -> php.ini to access this ) it actually lives in \wamp\bin\apache\apachex.y.z\bin\php.ini but dont edit it directly use the wampmanager menu link

Your php.ini used by PHP CLI
if you actually use the PHP CLI feature ( edit \wamp\bin\php\phpx.y.z\php.ini directly )

Compare your old and new versions, remember things may have changed, extentions added into the core of php and are therefore not required as extensions anymore etc.

Your my.ini.
Again things change, parameters get deprecate, new ones are created etc.
For example if you are using INNODB databases you will have to activate the innodb parameters which are by default commented out.
You may well have to check the mysql website for some information, they supply a How to upgrade page for all releases.
This is just an example [dev.mysql.com]

if you are going to mysql 5.6 you may want to add this parameter to resuce memory allocated my MySQL, the default tends to allocate arround half a gig of memory, and this will reduce it to something more sensible. You will have to placy with this to match your system requriements!!!!
table_definition_cache = 800

Once this is all sorted out you can look at restoring your MySQL users and your databases to the new version of MySQL.
Also remember if you are coming from a VERY OLD version of MySQL, this restore process may not be totally straight forward, and you should expect to have to tweek a few things when you find that the new version of MySQL does not like your old data. This is fairly unusual, but may happen. Again dont try and do this 10 minutes before you have to give a presentation using the new WampServer.

Bringing your websites forward to the new release
Now you can just copy your \wamp_old\www\* folders to the new \wamp\www\

Bringing your Virtual Hosts forward to the new release
At this point if you use Virtual Hosts you can bring over your extras\https-vhost.conf from the folder containing the old version of Apache to the new folder containing your new version of Apache.
Remember the instructions in this file may need tailoring to the new release of Apache.
At a minimum, remember to check for the 'Allow from', 'Require' changes, mentioned earlier, and uncomment the 'Include conf/extra/httpd-vhosts.conf' line from your new httpd.conf file.

Bringing old versions of Apache, MySQL and PHP from your old wamp to your new wamp.
Remember one of the best bits of WAMPServer is the ability to swap between many versions of Apache, MySQL and PHP.

So now you can bring your old versions of these over to your new WampServer install.

Copy ?:\wamp_old\bin\apache to ?:\wamp\bin
Copy ?:\wamp_old\bin\mysql to ?:\wamp\bin
Copy ?:\wamp_old\bin\php to ?:\wamp\bin

One thing to remember here is that this may be the first time you have installed a WampServer that knows anything about Apache 2.4 and NOT ALL PHP's will run in Apache 2.4
Basically because when they were compile and linked Apache 2.4 did not exist, and the linkage between Apache and PHP changed in Apache 2.4.

So in ALL your PHP version installations ?:\wamp\bin\php\phpx.y.z\ there is a file called wampserver.conf
In older releases of PHP it will probably look like this:
<?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'] =  '';

?>

This file tells wampmanager what the PHP interpreter dll is called, that is compatible with which major version of Apache.
This is used when switching between versions of Apache and PHP using the WampManager menus.
The older versions may be missing the linkage instruction for Apache 2.4, so you will need to add this extra piece of code.

However only add this new section if that version of PHP actually has a file called 'php5apache2_4.dll' in its folder.
If one does not exist, and they only exist for versions of PHP > 5.3.17 or there abouts, dont add this new section to wampserver.conf

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

To be honest the 1.3 and 2.0 settings in here could also be removed as hopefully you will never need them. So the end result of these changes should leave your wampserver.conf lookng 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'] =  '';

?>

So if you are running Apache 2.4.x and a version of PHP does not have a php5apache2_4.dll file, you will see a little no-entry icon beside that version when you use the WampManager menus and look at the PHP -> Versions menu. This is a visual queue that you should not switch to this version of PHP when using the currently running Apache version. Of course you can switch the version of Apache you are running to one that is compatible with that version of PHP and the visual queues will change indicating which versions of PHP are not compatible with the new version of Apache.

But remember this mechanism is controlled by the wampserver.conf file that is unique to each version of PHP. You cannot just add the new 2.4 information to every file, but only those versions that actually come with a php5apache2_4.dll. And before you ask, yes I suppose, and only suppose, it might be possible to re-compile old versions of PHP so thay are all compatible with Apache 2.4 but it is unlikely to happen. Old versions of PHP are old for a reason and you would only consider using them if you are trying to make your Development system as similiar as possible to the LIVE environment that your code will be deployed on, or you are using some very old, and probably badly written php code. In that case you would almost definitely want to use an older version of Apache as well.



If it all goes horribly wrong and you need to go back to the previous version you had running.

We can go back to your original wamp version by doing:

Start the new WAMPServer, and remove the MySQL and Apache services.
wampmanager -> Stop all services
wampmanager -> MySQL -> Service -> Remove service
wampmanager -> Apache -> Service -> Remove service
Now stop wampmanager.
rightclick wampmanager -> Exit

rename the current \wamp folder eg. \wamp_new ( or if you are totally giving up you can delete this one and start from scratch again another day. )
rename the \wamp_old folder back to '\wamp'

Start wampmanager, the existing icon on your desktop should still work, and Install the MySQL and Apache services.
wampmanager -> MySQL -> Service -> Install service
wampmanager -> Apache -> Service -> Install service

You should be back to where you were before starting this process.
Remember to clear you browser cache ( CTRL + F5 ) to ensure you dont get funnies happening once you switch installations.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.6.5.2> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-



Edited 10 time(s). Last edit at 03/12/2017 02:43PM by RiggsFolly.

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: BP1ofNC (---.carolina.res.rr.com)
Date: June 02, 2014 10:25PM

2. Run : wampmanager -> localhost ( clear the birwser cache CTRL+F5 to avoid any funnies )
== spelling error. .....
I'm reading and trying to rebuild WAMP after my hard drive crash. Thanks for the documents.

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: BP1ofNC (---.carolina.res.rr.com)
Date: June 02, 2014 11:49PM

I was using WAMP which I had installed on my 64-bit Windows 7 (while viewing [www.youtube.com]) prior to my hard-drive crash. Laptop repaired. Now, I have downloaded W32 numerous times with appropriate cleanup between attempts. The files extract and the setup never shows me browser selection screens but simply disappears after extracting the files to the correct directory. I have added all 3 sets (2008, 2010, 2012) of x86 vcredist after reading the Q /A on this forum. I cannot get past the impossible configuration file ... EFOpenError C:wamp\wampmanager.ini. Help, please.

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: satheeshr (123.236.92.---)
Date: June 14, 2014 07:01PM

hi all please solve my problem..
my wamp server shows error in french please help me to change the error language

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: STEPpingHEN (124.226.41.---)
Date: September 28, 2014 11:11AM

Unable to download the latest version of WAMP from China using the main website.

The problem may be that jQuery is inaccessible on the website. This is due to the GFW blocking the link to jQuery on Google's servers, i.e. the "ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js?ver=1.7.1" link doesn't work.

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 28, 2014 01:50PM

There is nothing we can do about that and it is not a WAMPServer issue.


The Golden Shield Project (Chinese: 金盾工程; pinyin: jīndùn gōngchéng), colloquially referred to as the Great Firewall of China (Chinese: 防火长城; pinyin: fánghuǒ chángchéng) is a censorship and surveillance project operated by the Ministry of Public Security (MPS) division of the government of China. The project was initiated in 1998 and began operations in November 2003.

You will have to find another location to get jQuery from, that the secret police are not blocking.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.6.5.2> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: STEPpingHEN (124.226.41.---)
Date: September 29, 2014 11:07AM

Thanks for your reply.

Would it be possible for the site to have a local version of the jQuery file on the server itself?

Or possibly provide an alternate mirror link or something in the event that the download fails? Or PM a link to the download link?

The main issue is that the site appears to use jQuery to open the download link, and therefore doesn't work when jQuery isn't used with the page.

Thanks

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: STEPpingHEN (124.226.41.---)
Date: September 29, 2014 11:11AM

Er, never mind. Managed to find the latest files on sourceforge. Thanks

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: MacNala (---.15-1.cable.virginm.net)
Date: October 30, 2014 05:21PM

I finally came across this message and was surprised to see the note
<quote>
However:
There is no real benefit in installing the 64bit WAMPServer over the 32bit version. In fact if you look at the PHP.NET site it warns us that 64bit PHP is in fact still experimental. In fact it has not yet been completely ported to full 64bit code.
</quote>
If this is really the case I find it surprising that this fact is not prominently displayed on the download page.

What disasters will befall me if I continue to persevere with the 64 bit version?



Edited 1 time(s). Last edit at 10/30/2014 08:07PM by MacNala.

Options: ReplyQuote
Re: Installing a new release of WAMPServer
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 31, 2014 12:14AM

No disasters that I am aware of.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.6.5.2> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote


Sorry, you can't reply to this topic. It has been closed.