3

I wanted to update my php version from 7.0.1 to 7.2.2. So I followed all the steps here in this tutorial.By of course putting 7.2.2 instead of the given value.

Once I restarted my wamp it does not show the new version. It still only show the oldest one 5.6.25 and 7.0.10.

I did not understand why. Is it because some instruction in the tuto for the extensions are those of 7.1.7.

Please how could i fix this problem.

DINA TAKLIT
  • 7,074
  • 10
  • 69
  • 74

5 Answers5

10

That tutorial looks very out of date.

First upgrade to WAMPServer 3.1.1 available from here it is the secondary repository, but it is much easier to navigate than SourceForge. Of course you should be able to find all this on SourceForge if you prefer.

You must be using WAMPServer 3.0 or above to run this upgrade, and I assume you are, this will just update any 3.0.? version to 3.1.1 without changing any versions of Apache/MySQL/mariaDB/PHP or any of your code or databases.

Then go back to the linked page above and find the PHP-ADDON that you want to install. The latest versions will all show automatically, if you want a non latest version then press the "See All Available Versions" button and all the versions of PHP/Apache/MySQL/mariaDB will be displayed.

Click on the version of PHP you want and it will download an installer for that version. Save it somewhere on disk and then run it. Once the new version is installed you will then see WAMPServer terminate automatically.

When you restart it you will see the new version available for selection using the wampmanager menus, to activate the new version of PHP just do

wampmanager -> PHP -> Version -> version numbers

Click the version number of PHP that you want to activate.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • Thank very much for this alternative.if you do not mind please can u tell me how could we do that if we have a package instead of the exec file – DINA TAKLIT Feb 16 '18 at 00:04
  • Sorry, don't quite understand what you mean by `a package` and `instead of the exec file` – RiggsFolly Feb 16 '18 at 09:28
  • yes absolutly cause in the first site i donwload it a Zip fil which mean theire is no setup – DINA TAKLIT Feb 16 '18 at 11:04
  • Yea the tutorial you were following was for WAMPServer 2.4 and 2.5. Things have got a LOT Easier installing ADDONS in V3+. This would also work in the same way for downloading different versions of Apache/MySQL/PHP/XDEBUG/phpMyAdmin and even mariaDB now – RiggsFolly Feb 16 '18 at 11:06
  • 1
    You can still do it that way, but just as with earlier versions of WAMPServer you do need to know what you are doing. If you want to do it that way, look around on the [WAMPServer Forum](http://forum.wampserver.com/list.php?2) You will find an old way documented in there somewhere – RiggsFolly Feb 16 '18 at 11:09
  • I use to have 3.0.somthing as a version of wamp so according to you was that the pb? – DINA TAKLIT Feb 16 '18 at 11:12
  • 1
    No. I think the problem was a bad tutorial. 99% of the WAMPServer tutorials out there are really just click bait. If you have a WAMPServer question come here or the [WAMPServer Forum](http://forum.wampserver.com/list.php?2) – RiggsFolly Feb 16 '18 at 11:17
  • 1
    Thank you very much for those constructive answer – DINA TAKLIT Feb 16 '18 at 11:24
  • I want to ask a question if u do not mind once i write in my cmd php -v it shows PHP 7.1.2 instead of 7.2.2 i did not understand why – DINA TAKLIT Feb 16 '18 at 11:26
  • 1
    I guess you have added the old path to PHP 7.1.2 into the Windows PATH. Very bad idea with WAMPServer as you can have many version of PHP inside WAMPServer. See [this answer for a suggested batch file to use so you can use any of your versions of PHP dynamically](https://stackoverflow.com/a/16289254/2310830) – RiggsFolly Feb 16 '18 at 11:32
  • i have already add 7.2.2 to my PATH and > phppath deos not worked for me and i did not understand what did he mean by cd to ur source folder – DINA TAKLIT Feb 16 '18 at 11:44
  • Did you remove 7.1.2 from the PATH as well – RiggsFolly Feb 16 '18 at 11:45
  • from what? PATH or bin/php ? i only have 5.6.25 and 7.0.1 and 7.2.2 version i do not know how does it show this version eventhough i do not have it in my bin/php folder – DINA TAKLIT Feb 16 '18 at 11:48
  • I have fixed the pb now cause once i did set PATH=%PATH%;C:wamp\bin\php\php7.2.2 i find it does not add this path maybe because i have put "\" i add it in the other way and it works now thank u very very much – DINA TAKLIT Feb 16 '18 at 11:52
  • So am I to install in a different folder? If I install in a different folder other than the default "C:/wamp64" wouldn't that affect my running databases in the new installation? – Eric McWinNEr Jul 24 '18 at 00:51
  • 1
    @DINATAKLIT , i am upgarding PHP version from 7.2.10 to 7.2.17, wamp server 3.1.4, PHP version 7.2.17 is not showing in Green Icon->PHP->versions, Also i have removed php path from envirment variable but wamp stil showing error "error c /wamp64 or php in path", can you help how to reolve issue ? – user3782114 May 04 '19 at 05:38
  • I'm sorry I had more then one year not working with wamp so I do not remember anything related to it, and now I'm using linux I can not try with you. Please RiggsFolly do you have any idea how @user3782114 can fix his issue. – DINA TAKLIT May 04 '19 at 12:30
2

Just to add as I came across this today while looking to upgrade from 7.1.9 to 7.2.13 in WAMP.

Ref: https://john-dugan.com/upgrade-php-wamp/

Basically:

  • Download 7.2.13 (or version of choice) from https://windows.php.net/download/
  • Extract files to versioned folder e.g. wamp/bin/php/php7.2.13
  • Copy php.ini, phpForApache.ini and wampserver.conf from wamp/bin/php/php7.1.9 folder into new php folder
  • replace all occurrences of old folder name in php.ini and phpForApache.ini e.g. replacing php7.1.19 with php7.2.13
  • Exit WAMP
  • Start WAMP
  • Click WAMP menu, PHP, Version, select your new version

You might also need to copy over/download extensions if they don't exist in the new php setup.

This is for windows machines running WAMP anyway

Regards Liam

Liam Wheldon
  • 725
  • 1
  • 5
  • 19
  • 2
    ___Warning!___ _Copy php.ini, phpForApache.ini and wampserver.conf from wamp/bin/php/php7.1.9 folder into new php folder_ **This can be dangerous!** Things change in these files Specially when moving between Major Versions of PHP – RiggsFolly Feb 06 '19 at 11:36
  • I had to also copy php7apache2_4.dll into the folder and restart to be able to switch from php7.1.9 to php7.2.21 – aimme Aug 10 '19 at 20:26
0

For WAMP Server in sort, I will tell you, make a change these 3 files only. just copy these files from old version and paste into new version.

php.ini
phpForApache.ini
wampserver.conf // do not edit this file only copy and paste

then last step is open php.ini , phpForApache.ini files and only change version like 7.1.9 to 7.2.33.

ok finish. restart your services.. only one thing you have to do that is select PHP-Version from WAMP

pankaj
  • 1
  • 17
  • 36
0

I can recommend this http://wampserver.aviatechno.net/

I had problems with updating too, but on this website are Wampserver add-ons like new PHP version (PHP 5.6.40, PHP 7.0.33, PHP 7.1.33, PHP 7.2.34, etc.) And you don't have to manually edit files like php.ini or phpForApache.

You can update

  1. PHP
  2. Phpmyadmin
  3. Apache
  4. Mysql versions
  5. and wamp latest versions

These updates won't affect the existing Databases and files.

jai
  • 71
  • 12
-2

I noticed the apache2 mods were not updated properly going from php 7.0 to 7.2.

I had to remove the files in /etc/apache2/mods-enabled regarding php 7.0, then **sudo apt install libapache2-mod-php7.2 --reinstall** to install the new ones.

Jignasha Royala
  • 1,032
  • 10
  • 27
  • 6
    What are you doing with `sudo apt` anything? What is this `/etc/apache2/mods-enabled`? WAMP is for Windows environments. – Web and Flow Jul 24 '18 at 12:10