How to upgrade PHP version 5.XX to 7.XX version in XAMPP for Windows Server

There is always an open issue on the older version of the tool, so it is best to upgrade your tool if it is going to be compatible. Similarly in PHP also, the older version that I had was 5.5.15 and figure out that it might breach our security with SQL Injection. Thus, I was forced to upgrade our XAMPP server with the latest PHP version 7.1.

The following resolution also solves the issue of “The program can’t start because php5ts.dll is missing from your computer“.

While working on it, I took the reference from many blogs while looking around the solution and indeed those sites helped me. So I thought to blog with all the problem I faced in one place and which might help you in the future.


1. First, download the required PHP version for Windows. I strongly recommend using x86 Thread-safe version. In many blogs, it suggests for x64 version and it didn’t work for me.

2. Once you unzip it, simply copy paste the whole PHP files under PHP folder to your XAMPP installation directory.

Note: I would recommend making the backup copy of your older PHP folder. You might need .ini file later. 

3. Next, open httpd-xampp.conf from XAMPP configuration.


And modify the PHP location in it. You can comment out the line of php5ts.dll and php5apache2_4 or simply delete it.

LoadFile "C:/xx/xx/server/php/php7ts.dll"
LoadFile "C:/xx/xx/server/php/libpq.dll"
LoadModule php7_module "C:/xx/xx/server/php/php7apache2_4.dll"
#LoadFile "C:/xx/xx/server/php/php5ts.dll"
#LoadModule php5_module "C:/xx/xx/server/php/php5apache2_4.dll"

Then, copy php.ini from your old PHP folder which you back up as in my case, it was asking me that php.ini is missing from your PHP folder. It might not be needed in your case but it is good to have a backup in any case.

After this, kindly restart your XAMPP server and it will work with the newer version of PHP.




Thank you





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s