Can I upgrade Apache but not PHP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can I upgrade Apache but not PHP

Postby niltinho » 12. August 2016 01:44

Hi all,

sorry this may sound like a silly question, but I have a dilemma here, I am running a quite old version of XAMPP 1.6.8 (Apache/2.2.11 PHP/5.2.9) as I have a quite extensive web app using old php mysql functions like mysql_query instead of mysqli_query. I have developer woring on updating this at moment so I can upgrade my PHP and MYSQL as well, but will take some time.

At moment I am in the middle of a security assessment and pen test, the provider is failing my test due to the version of Apache, I need to upgrade to 2.4.x.

Is there a way I could upgrade only the Apache itself and not the PHP for the time being?

Thank you!
Posts: 1
Joined: 12. August 2016 01:15
XAMPP version: 1.6.8
Operating System: Server 2008 Web Edition

Re: Can I upgrade Apache but not PHP

Postby Nobbie » 12. August 2016 10:20

niltinho wrote:Is there a way I could upgrade only the Apache itself and not the PHP for the time being?

Honestly, i dont know. The main problem is, that there are certain interface DLLs (phpts.dll or similar) which have to match as well PHP as Apache. I am not sure, if there is a solution for "very old PHP" and "very new Apache". Usually the tools match to each other. Of course, it is possible not to run the very newest PHP with a very new Apache, but i dont know were this kind of compatibility stops. I dont think that you can mix any Apache version with any PHP version.

Anyway, it is a quite a big task to replace Apache in Xampp and it is not recommended to replace any of the tools delivered by Xampp. That is one of the disadvantages of having Xampp, take it as it is or leave it. On the other hand, the advantage of Xampp is the "easy installation" and the properly preconfigured environment.

If I were you, I would try to install Apache/MySQL/PHP standalone, not from Xampp, and choose the versions you need. Then try to configure the whole stuff in order to run properly. That sounds more difficult as it is and i dont think that it might be easier to "simply" replace Apache in an existing Xampp installation. Of course you must backup all your things (including the whole Xampp installation) before any further action. If you can use a different PC for the "new" installation, that would be the safest way not to destroy your existing environment.
Posts: 10621
Joined: 09. March 2008 13:04

Re: Can I upgrade Apache but not PHP

Postby Altrea » 12. August 2016 15:43

You could try to install a current XAMPP version and configure it to add your old PHP version via FCGID/CGI.
Adding by CGI does have mich less compatibility problems as trying to use PHP as Apache module, but there can be some other sideeffects of course.

Definitely not a task for an unexperienced user.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
AF Moderator
Posts: 9366
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 27 guests