Upgrade server
Posted by: gany (---.revip2.asianet.co.th)
Date: April 16, 2014 05:58AM

I have Wamp 2.2, with php version 5.3.8 on it. Try as I may, I can't get the php 5.4.27 package installed. I can install the package from win.php.net, but I can't get it to work; the wamp button remains orange. I followed several tutorials, but no luck.

I got quite a bunch of Joomla sites on Wamp, all of them backed up with Akeeba. What I plan to do now is to uninstall & remove Wamp, and install a fresh version. Then use Akeeba to restore the Joomla sites. Will that work or would I run into trouble doing that?

Options: ReplyQuote
Re: Upgrade server
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: April 16, 2014 02:18PM

If you ran an actual install for the PHP5.4.27 it will have been put in the wrong place and probably put ini files in places that wamp does not like. ( wamp is nice and compact and does not use anything outside its own folder) The exe installs are not so nice.


I would suggest uninstalling it, if that is what you have done.


The simplest way to upgrade is


Before installing the new release.

This is not a simple click and go process. There are many 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.


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 what disk you installed on. The only things that are linked to the folder you install it into are the installation 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 your original install is basically removed.

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.

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 ) 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 wamp folder to something eg 'wamp_old'. This is your backup!

Now you can install the new version of WAMP Server, so lets do that.
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\

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
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 are using Apache 2.4.?
Now it a good time to read through the STICKY post [forum.wampserver.com]


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 becasue when they were compile and linked they did not know that Apache 2.4 existed, 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 olny 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 woudl 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 woudl 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 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.