installing two versions of php with xampp on ubuntu system
The solution I've done
Note :
at installing new version of xampp I got mysql errors
I think it because the version of mysql
so make sure that backup all databases before that
1- install xampp with php 5 from the site
2- install xampp with php 7 from the site
to here we must have php5.so and php7.so in same dir
3- open /opt/lampp/etc/extra/httpd-xampp.conf and add two line :
instead of one line of php 7
LoadModule php7_module modules/libphp7.so
LoadModule php5_module modules/libphp5.so
4- before running xampp file just comment the undesired version
to run php 5 :
#LoadModule php7_module modules/libphp7.so
LoadModule php5_module modules/libphp5.so
to run php 7 :
LoadModule php7_module modules/libphp7.so
#LoadModule php5_module modules/libphp5.so
5- start xampp
Mustafa Agamey
if (Help with other) { All get better; All happier together; } else { One worst forever; }
Updated on July 19, 2022Comments
-
Mustafa Agamey almost 2 years
I searched for how to install php5 and php7 on same machine but i didn't find the an answer.
I'm working on two different project one depend on php5 and the other work on php7
I use xampp on linux
how can i run two versions of php 5 & 7 on xampp @ linux ubuntu 16.04 machine ?
-
Axel Stone over 3 yearsDid you install both XAMPPs into the same /opt/lampp directory? XAMPP's installation wizard does not allow to choose installation directory.
-
adadion over 2 yearsUnfortunately, I can't load phpmyadmin while I'm on php5 using this method
-
Phoca almost 2 yearsThis solution works great on Linux