How do I run PHP 5.3 and 5.2 in one installation of XAMPP
You can do it in the same installation, though I personally just run two different servers as it often means different projects altogther. Nevertheless.
The best way to do this is to rename your original PHP package (PHP_OLD or something) and create a new one so you can switch back easily if need be.
Download the version of XAMPP running PHP 5.3 and copy the PHP directory out of XAMPP and don't forget to grab the 5.3 packages out of xampp/apache/bin (there are about ten of these). You may need to rename some files (or not, can't remember 100%) but restart XAMPP and give phpinfo() a shot.
PHP 5.2 and 5.3 together
You can do one of the following:
Ensure your older apps can run on 5.3 while not using 5.3 specific features. This is probably the
best route as it will tighten your
code and it will run on more
platforms, especially in the future
when more production environments
use 5.3 only.If this is for development purposes only you can also consider:
multiple installations
of XAMPP and switch between them
when necessary via simple folder
rename (somewhat tedious)php-switch (very tedious)
setup two apache servers on the same machine running different PHP versions
How to downgrade php from 5.5 to 5.3
Short answer is no.
XAMPP is normally built around a specific PHP version to ensure plugins and modules are all compatible and working correctly.
If your project specifically needs PHP 5.3 - the cleanest method is simply reinstalling an older version of XAMPP with PHP 5.3 packaged into it.
XAMPP 1.7.7 was their last update before moving off PHP 5.3.
Downgrade my PHP version from ver. 5.3.8 to ver. 5.2 in XAMPP
Install WampServer. WampServer lets you install multiple versions of PHP, Apache and/or MySQL, and switch between them all via a menu option. ;)
How do I change the default path of PHP in XAMPP?
- Download your desired version of the PHP thread-safe binary (zipped) from http://windows.php.net/download/.
- Unzip the downloaded version of the PHP in a separate directory. Please make sure that your new php directory's name is not "PHP". (For example, use
php54
for PHP 5.4) - Copy the new PHP directory into your XAMPP directory. (DO NOT overwrite your existing
php
directory!) - Now go to your xampp/apache/conf/extra directory. Make a backup of, then open the
httpd-xampp.conf
file. Change the following variables/directives:
PHPINIDir
to be[your xampp folder]/[new version of PHP]
LoadModule
to be[your xampp folder]/[new version of PHP]/php5apache2_2.dll
Save the
httpd-xampp.conf
file. Restart your XAMPP apache server. If your server get restarted successfully, then your server's PHP version was upgraded. You can check the status of your PHP version by using the URL[localhost][:port]/xampp/phpinfo.php
.
If you are still having issues, try this as well:
Change the LoadFile "[xammp folder]/php/php5ts.dll"
directive to LoadFile "[xampp folder]/php54/php5ts.dll"
Source : http://www.techflirt.com/how-to-upgrade-php-in-xampp/
How to switch PHP version back and forth?
The most hassle free way would be to run it as CGI instead of using mod_apache. Then you can run both simultaneously by simply changing handler .php
with a .htaccess or in a vhost.
how to change php version in htaccess in server
To switch to PHP 4.4:
AddHandler application/x-httpd-php4 .php
To switch to PHP 5.0:
AddHandler application/x-httpd-php5 .php
To switch to PHP 5.1:
AddHandler application/x-httpd-php51 .php
To switch to PHP 5.2:
AddHandler application/x-httpd-php52 .php
To switch to PHP 5.3:
AddHandler application/x-httpd-php53 .php
To switch to PHP 5.4:
AddHandler application/x-httpd-php54 .php
To switch to PHP 5.5:
AddHandler application/x-httpd-php55 .php
To switch to PHP 5.6:
AddHandler application/x-httpd-php56 .php
To switch to PHP 7:
AddHandler application/x-httpd-php7 .php
To switch to PHP 7.1:
AddHandler application/x-httpd-php71 .php
Related Topics
Block Specific Ip Block from My Website in PHP
Improve This PHP Bitfield Class for Settings/Permissions
Pdo Looping Through and Printing Fetchall
Preparing PHP Application to Use with Utf-8
Upload Video on Youtube Using Curl and API V3
Decoding Numeric HTML Entities via PHP
How to Add a Method to an Existing Class in PHP
How to Keep the Chinese or Other Foreign Language as They Are Instead of Converting Them into Codes
PHP & MySQL: Using Group by for Categories
HTML Table Using MySQLi and PHP
Symfony2 Collection of Entities - How to Add/Remove Association with Existing Entities
Learning Select from Where Prepared Statements
Phpexcel Reader -- Help Required
Set Application_Env via Virtual Host Config and Read This in PHP