Install new php version in wamp for magento [duplicate] - php

This question already has answers here:
Best way to Upgrade wamp 2.0 to 2.5
(4 answers)
Closed 4 years ago.
I had faced two problems with Wamp.
1) I cannot upgrade the php version. I tried a recommended way https://john-dugan.com/upgrade-php-wamp/ , but it didn't work.
2) I cannot change the php version from 5.6.16 to 7.0.0 (the default versions of wamp)
These problems showed up when I added a Magento framework in my wamp server. The only version which accepted for Magento setup are 5.6.5, 7.0.2, 7.0.4, 7.0.6
What Can I do?

Via This answer
Download binaries on php.net (ZIP package based on your PC bit That package should php.exe file)
Extract all files in a new folder :C:/wamp/bin/php/php(7.0.0)/
Copy the wampserver.conf from another php folder (like php/php5.6.16/) to the new folder
Rename php.ini-development file to phpForApache.ini
Restart WampServer

If you are using a version of WAMPServer > 3.0 then there are lots of simple php ADDON installs that you can pick from
See SourceForge repo for all the available PHP ADDONS
Or the backup Repo which can be easier to navigate than SourceForge.
These are simply download and run the installs. It will just add another PHP folder in the usual place in the wamp folder structure.
You can then Switch to the new release and back again to older releases using the wampmanager menus.
Note: There are also many versions of Apache and MySQL as well.
And if you upgrade to WAMPServer 3.0.8 (again a simple download and click the install), you can also add MariaDB installs as well.

Related

How to change PHP version in XAMPP?

I've downloaded XAMPP ver. 7.2.10 which supposedly has the PHP ver. 7.2.10.
But when I run a composer update on cmd, it says that my PHP version is 7.0.21. I need to have a PHP 7.1.3 in order to run my frameworks.
Is there a way to change the PHP version without installing a new XAMPP? Because I already have the latest version installed and the PHP versions stated in the XAMPP and CMD are different.
Change you Xampserver you can't change php version inside xampserver
you can download from below link
Download xampserver
You can also do it in another way.
Download your desired version of php here and then go to XAMPP folder (most likely C:\xampp).
There, extract the downloaded php file and name it php (paste it in C:\xampp) Then, copy all files from your old php folder and paste it in the new php folder.
Do not replace any files, just copy missing files and if your php version is less than 7, don't forget to edit your httpd-xampp.conf file.
Restart your Apache server and, hopefully, it will work.
Maybe you are using another version of php, check if you have another version installed and see environment variables and path there should tell you the php path used, or maybe you have an apache running, to stop it enter services and stop apache24.
Your Bash/Terminal runs in it's own PHP world.
You can upgrade it with apt-get on XAMPP VM
see here:
https://die-schwarzwald-werbeagentur.zazudesign.de/internet-programmierung/a-working-typo3-9-4-x-composer-installation-on-xampp-osx-php7-2-imagemagick-mariadb.html
After upgrading PHP to 7.2 composer will work. For some reason composer uses the bash PHP-version and not the Apache2-PHP-Version

It is possible to use different PHP versions in lampp [duplicate]

I'm developing one web application, using PHP eclipse IDE.
For an instance i want to switch from one PHP version to another version which resides in different location.
Below is my working environment :
1) Having Centos OS
2) PHP 5.1.6 have installed already while installing centos OS
3) Above PHP is installed in /usr/bin/ path
4) I have installed LAMPP in /opt/lampp
5) In LAMPP present PHP 5.2.6 version
I want to configure local web server such that lampp should choose PHP 5.1.6 (which resides in /opt/lampp )
I am not aware of this switching of PHP version.
Please suggest me how should i configure this switching of PHP version in my local web server.
Which configuration file should i choose for modifying this change.
Thanks a lot !!!
-Pravin
http://gggeek.altervista.org/2007/07/21/running-multiple-php-versions-on-a-single-apache-install/
This guide is a great guide and will get you started!
Another alternative would be to install Xampp, as I believe they provide a batch file that helps you switch versions of PHP in a second.

wamp update php to 7.2.2 version does not work

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.
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.
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
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
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
PHP
Phpmyadmin
Apache
Mysql versions
and wamp latest versions
These updates won't affect the existing Databases and files.
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.

Upgrading PHP 5.4.0 in XAMPP for Windows?

I want to upgrade to PHP 5.4.0 in XAMPP. I'm using windows operating system. I searched on web, but there was no proper guide for this as it was released recently.
Can anyone give me some instructions on how to upgrade to PHP 5.4.0 in XAMPP (windows)?
Download the latest binary version of PHP (make sure to get the .zip package not the installer)
De-archive it to a directory
Copy the contents of the directory in the php subfolder of your XAMPP installation directory, overwriting the files which are already present
Overwrite the files which are already present in the apache\bin directory with the newer versions.
Now the trick: take the files which have a "_2" in their names (for example php5apache2_2.dll or php5apache2_2_filter.dll), copy them in the apache\bin subdirectory and remove the "_2" part, overwriting the existing files. This is necessary because by XAMPP uses Apache version 2.2 and the files with the 2 prefix are built for Apache 2.0, so you must take the files build for the newer version (which has a different plugin interface) and rename them in the filenames XAMPP expects.
Source
I found a working php_uploadprogress.dll extension for xampp windows with php 5.4 here:
http://www.fsbcomputers.com/php_uploadprogress
there are 32 and 64 bit versions as well as a preview for php 5.5.
By the way, the php build numbers, apache /xampp refers to are:
PHP 5.2: 20060613
PHP 5.3: 20090626
PHP 5.4: 20100525
I hope that you are still following this, I installed php 5.4 on the latest xampp stable with no problem.
Fortunately for you, there is a beta update of xampp which makes life easier. http://www.apachefriends.org/en/xampp-beta.html
Just make sure to make a complete backup of your old xampp directory, and export your old databases so you can import them into your new (updated) mysql installation. Alternatively you do not need to update mysql, I use this beta and I can say that it's pretty solid.
EDIT: The pop-up warning were a problem that I had too, I recommend using the latest beta. But, you can fix the errors and use php 5.4 on your old install (not recommended) by commenting out the following line in php.ini
extension=php_oci8.dll
Change to
;extension=php_oci8.dll
I have done the upgrade in ubuntu. Following are the steps to do the upgrade.
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install php5
sudo /etc/init.d/apache2 restart

upgrade PHP 5 on Plesk 9.2.1

I have Parallels Plesk 9.2.1, Debian 4 and 5.2.0-8+etch13
Is it safe to upgrade PHP5 to the latest version and how do I do it - I mean is there something special I have to be aware of?
I just did this with Plesk 9.2.1 and got it to work eventually.
In order to upgrade PHP 5 to the needed version please do the following:
back up the directory %plesk_dir%\Additional\PleskPHP5 - just in case something will go wrong
stop the Plesk services (Control Panel and all that are included in the Plesk Run-Time section)
rename folder %plesk_dir%\Additional\PleskPHP5 to the orig_PleskPHP5
create a new folder PleskPHP5
download the needed version of PHP. It should be the PHP 5.2.11 Non-thread-safe zip package.
unzip the content and copy it to the newly created folder PleskPHP5
copy the file php.ini from the old folder to the new one
start the web server services
You will likely need to install this IIS 7 HotFix: FIX: A PHP application that depends on the REQUEST_URI server variable may fail when you run the PHP application in IIS 7.0.
Be aware of is that other versions of PHP were not tested with Plesk 9 (the tested versions are shipped with Plesk).

Categories