Page 1 of 1

Can I upgrade Apache but not PHP

PostPosted: 12. August 2016 01:44
by niltinho
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!

Re: Can I upgrade Apache but not PHP

PostPosted: 12. August 2016 10:20
by Nobbie
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.

Re: Can I upgrade Apache but not PHP

PostPosted: 12. August 2016 15:43
by Altrea
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.