0% found this document useful (0 votes)
130 views3 pages

Use Different PHP Version

To use a different version of PHP with XAMPP: 1. Download and extract the PHP version to a new directory within the XAMPP installation directory. 2. Rename the php.ini file and edit the httpd-xampp.conf file to reference the new PHP directory. 3. Restart Apache through the XAMPP control panel for the changes to take effect and verify the new PHP version.

Uploaded by

Ricky Hadiyanzah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views3 pages

Use Different PHP Version

To use a different version of PHP with XAMPP: 1. Download and extract the PHP version to a new directory within the XAMPP installation directory. 2. Rename the php.ini file and edit the httpd-xampp.conf file to reference the new PHP directory. 3. Restart Apache through the XAMPP control panel for the changes to take effect and verify the new PHP version.

Uploaded by

Ricky Hadiyanzah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Use a Different PHP Version

In many cases, you might want to use XAMPP with a different PHP version than the one that comes preinstalled. You might do this to get the benefits of a newer version of PHP, or to reproduce bugs using an earlier
version of PHP.
To use a different version of PHP with XAMPP, follow these steps:
1. Download a binary build of the PHP version that you wish to use from the PHP website, and extract the
contents of the compressed archive file to your XAMPP installation directory (usually, C:\xampp). Ensure
that you give it a different directory name to avoid overwriting the existing PHP version. For example, in this
tutorial, well call the new directory C:\xampp\php5-6-0.

NOTE

Ensure that the PHP build you download matches the Apache build (VC9 or VC11) in
your XAMPP platform.

2. Within the new directory, rename the php.ini-development file to php.ini. If you prefer to use production
settings, you could instead rename the php.ini-production file to php.ini.
3. Edit the httpd-xampp.conf file in the apache\conf\extra\ subdirectory of your XAMPP installation directory.
Within this file, search for all instances of the old PHP directory path and replace them with the path to the
new PHP directory created in Step 1.
In particular, be sure to change the lines
LoadFile "/xampp/php/php5ts.dll"
LoadFile "/xampp/php/libpq.dll"
LoadModule php5_module "/xampp/php/php5apache2_4.dll"

to
LoadFile "/xampp/php5-6-0/php5ts.dll"
LoadFile "/xampp/php5-6-0/libpq.dll"
LoadModule php5_module "/xampp/php5-6-0/php5apache2_4.dll"

NOTE

Remember to adjust the file and directory paths above to reflect valid paths on your
system.

4. Restart your Apache server through the XAMPP control panel for your changes to take effect.
The new version of PHP should now be active. To verify this, browse to the URL
http://localhost/xampp/phpinfo.php, which displays the output of the phpinfo() command, and check the version
number at the top of the page.

You might also like