How to update XAMPP PHP version

In the past I have just uninstalled the old version and installed the new one. All your data should be saved but to be safe I used to rename my htdocs folder.

The server has to be started from the XAMPP control panel unless you have installed it as a service.

I’m unable to restart it from there. The log says installer not found and doesn’t show “running” when I click on it to start. How do I get my CLI to accept $ signs?

Ah, a common misunderstanding.

The “$” is the prompt for *nix
For Windows it’s “>”

If you have the Window prompt, you don’t need the “$” as part of the command.

This has no quite been of much help to me http://php.net/features.commandline.webserver. The tilde character doesn’t work on Windows an my server refuses to start as the docs on the manual do me little or no good.

Why are you trying to run php.exe?

Xampp has a control panel as you need to start more than just php. You should be using xampp_start.

I tried that but it returns an error. It says syntax error on httpd.conf line 455 which says
#XAMPP specific settings Include "conf/extra/httpd-xampp.conf"

But I changed that last line to
Include "/xampp/apache/conf/extra/httpd-xampp.conf"

Since the httpd.conf directory contains no such files
Second error I’m getting is from line 18 of
` “c:/xampp/apache/conf/extra/httpd-xampp.conf”
Cannot load c:/xampp/php/php5apache2_2.dll into the server but the file is clearly there

You are digging yourself into a deeper and deeper hole and I would suggest you start again. You can not just go changing things hoping they will work. If the file is missing there is at least one problem and probably more.

Your include path is outside of the localhost and is still pointing to the same place.

Did you read this thread [Update] (https://community.apachefriends.org/f/viewtopic.php?p=190334&sid=e09979404f246601c583727ffae6fefc)on the xampp forum?

1 Like

This is a complete waste of time when in minutes you could be running a vm with puphpet.com. Also upgrading has a high potential to trash the environment you use for other projects on your system. What are you going to do if you find a bug with an existing project and need to fix it? I doubt your production servers are running php 7. So you will either need to downgrade or just toss integrity out the window and hope your changes work on production with a completely different version of php.

Thanks for the puppet link but I’m doing this for my development server and secondly, I don’t use vagrant nor Debian. I said xampp. That puppet repo looks like a language on its own, something like json.

@Rubble I’ve read that link and what I understood they’re suggesting is for every “upgrade”, I have to dismantle the entire system and reinstall regardless of the fact that I only intend upgrading just one of the components which is PHP. If that is correct please confirm.

puphpet.com NOT puppet. Xampp is an out dated, amatuer solution to a problem better solved with vms. With puphpet.com there is few reasons other than laziness and unwillingness to learn new things not to use it. Not to mention learning to use a vm is a skill that persists across all languages. Xampp is a very limited solution only suited for the simplest of tasks because once you begin working on projects that include multiple layers of technology including extensions working directly on a host windows os via xamp becomes problematic. For example, if a project were to have a dependency on imagick or oauth you would need to install those with xampp. That is a very tricky task. On the other hand, if you were running a vm on puphpet is would be a mater of adding a few lines to a configuration. The same for other common technologies like ruby, node, several search systems, etc.

Also like I mentioned before if you have existing projects that are not on production servers with php 7 your introducing a significant amount of risk working on those projects in php 7 locally. Your local development environment should always be a close, mirror of the production environment. Running 7 locally and pushing to a server with 5.x is a HUGE difference likely to result inconsistencies and unseen errors until its to late. I would find it hard to believe you don’t have existing projects that are running on 5.x.

Laziness? Seriously? Hope you aren’t taking this personal. Besides, I have no business with PHP 7–I said 5.6.

I’m just learning of how sluggish VM’s are in comparison to dual booting and while I may not be in the best position to listen to anyone argue about which would pay me off better,considering my coding has been totally grounded for the entire period this issue has lingered, the question I think I want an answer to is why I need a new machine to run my server on. Why doesn’t it just run like it used to before I tried upgrading?? And thank you for hanging in there.

There is a misconception that vms are slow which is false. The misconception stems fro using default file sync which can be very slow except on solid state machines. However, using NFS on mac and SMB on windows the file read/read process is just as fast as if you were writing/reading from only the host machine.

Fyi yes it is lazy to use XAMP instead of a vm. Isn’t the whole selling point of Xamp laziness… ie. one click install :confused:

Although I don’t disagree with @oddz points, I think everyone needs to simply focus on the issue at hand. Xampp isn’t working and the person would like it to. I realize that doesn’t meet up with some of our development choices but unless @nmeri17 wishes to explore a VM solution, we need to respect his choice (and from a quick read, it sounds like he doesn’t want to pursue a VM solution).

@nmeri17, personally, I’d copy your works to a new location, uninstall the current version of Xampp (via the control panel), destroy the folder that Xampp used to live in (if it still remains), then download and install a version of Xampp that utilizes PHP 5.6

Once that is proven to be working, copy your works back into a spot where Xampp will understand them.

4 Likes

or just download xampp portable, no installation + the ability to have simultaneous instances. upgrade is just downloading the new version, extraction, run setup.bat, copy files and databases. this way you can always have a look at previous version, too.

2 Likes

I was able to simply download a copy of PHP 5.6 and simply swap the php folder names.

The only other thing to change is to update the php.ini file to add anything that you had in the old version that you need in the new one.A file comparison program comes in useful for working out what you need to copy across.

2 Likes

I tried this. It is a more convenient option for me since I’m unable to download a brand new xampp version because Data costs are too exorbitant in my country and the file size is humongous. It didn’t work. I deleted the folder and re-unpacked the old xampp folder then dumped the new PHP in it but it still refused to run

So how long have you been working on this now in man hours?

did you update the php.ini file?

Sorry. I didn’t know I’m supposed to do that. What lines am I to remove/add??