How to upgrade to latest php version in xampp from 5.3 to PHP Version 5.6.23

How to upgrade to new php version in xampp from 5.3 to PHP Version 5.6.23?

When we are using xampp for Website development with PHP and Apache server. Some times need arise to upgrade the php to latest version. This helps in saving time for installing softwares from startup.

  1. Backup your xampp current folder and data folder/Scripts folder before upgrade. Any issues in upgrade can destroy your work.
  2. Download  PHP  Version (x) : Download the version of php  to which you want to upgrade from here Unzip the folder and give it name. Its your choice to name it php-x.x version or any other name But please dont give “php” to it. As, in xampp current installation there is already a folder named “php”.
  3. Stop your xampp server i.e. MySQL , Apache or any other server if you are running.
  4. Now go to yourxamppdirectory/apache/conf/extra folder. Inside extra folder Open file httpd-xampp.conf  . I am using the same values which are on my system to avoid any confusions. My xampp directory is c:\xampp1. Change the following variables:

Variables with old values

LoadFile “C:/xampp1/php/php5ts.dll”
LoadFile “C:/xampp1/php/libpq.dll”
LoadModule php5_module “C:/xampp1/php/php5apache2_4.dll”

PHPINIDir “C:/xampp1/php”

ScriptAlias /php-cgi/ “C:/xampp1/php/”

<Directory “C:/xampp1/php”>


Variables with new values

LoadFile “C:/xampp1/php-5.6.23/php5ts.dll”
LoadFile “C:/xampp1/php-5.6.23/libpq.dll”
LoadModule php5_module “C:/xampp1/php-5.6.23/php5apache2_4.dll”

PHPINIDir “C:/xampp1/php-5.6.23”

ScriptAlias /php-cgi/ “C:/xampp1/php-5.6.23/”
<Directory “C:/xampp1/php-5.6.23”>


Now restart your xampp server. It will work now.

Run phpinfo() command from file and see new version in it.

Issues faced while doing ugrade.

After starting xampp server, I found below error  :

Issues 1 :

Fatal error: Call to undefined function mb_detect_encoding() in yourxamppdirectory\phpMyAdmin\libraries\php-gettext\ on line 177

Solution is :

  1. Stop xampp.
  2. There is no php.ini file in new folder i.e. So, i copied php.ini-development and rename it to php.ini (the php configuration file).
  3. I googled the issue and done below changes i.e. edit php.ini (the php configuration file), Now my MySQL, Apache server and PHP is working. Look for

OLD values

; On windows:

New values

; On windows:

Remove semi colon from below extension o enable dll’s.

extension=php_exif.dll ; Must be after mbstring as it depends on it
Restart your xampp server.
Restart xampp and hopefully it’ll work.


Please share your views in comments.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *