Do I need PHP twice?

I’ve installed a local server running XAMPP, it installed PHP with it and I’m adding it to my system environmental path, Isn’t that enough to call php commands from the command prompt? It keeps telling me "not recognized as an internal or external command.

When I look under xampp’s status page, it tells me PHP is not activated… is there a way I should be able to activate it then?

Click the phpinfo() and see what it says

Try going to the control panel and turning php on.
If you have installed as a service it should turn on every time you start the computer.

In the newest version, you have to click “Config” which is on the top right of the control panel and click on the panels you want to “autostart”

Save yourself the trouble and use puphpet. Xamp is old, antiquated solution to a problem much easier solved with more modern technology. Not to mention isolating software installation to a vm prevents any possibility of breaking your os. Where as installing web dev software like php many times leads to fudging with things that can potentially bring down an os.

Yes, if you’re going to work with multiple versions of PHP IMHO a VM is the way to go.

If you said “need PHP twice?” because you thought that might be what you needed to do to solve your XAMPP problem, then a VM is still a good idea unless you’re not ready to tackle the learning curve yet and simply want to learn PHP

I would argue that using puphpet to provision a vm with vagrant is less of a learning curve than using Xamp. Especially, when you will inevitably be needing various extensions and a front-end stack of technologies like sass and bower. All that is much simpler to set-up via puphpet. There is a really good article on here on using puphpet to set-up a vm that makes everything a snap.

True, I guess they both have “gotchas”.
Even so-called “one-click” installs can be messed up if something is done wrong.

TBH I think most of the problems I encounter with installing are more because of my OS (Windows)

What I’m really saying is that Xamp only solves one problem installation of php. However, most real-world projects require an abundance of other technologies that can be a real time suck to set-up on none Linux machine and have the potential to blow up the os especially with windows. Might as well nip that problem in the butt and use puphpet from the start that not only makes php easy to install but also several other common technologies used in lamp based projects. You also get things like xdebug from the start. No need to try and figure out how to set that up in a magical world of Xamp or any extension for that matter.

Here’s a much better alternative.

You’ll get set up in 5 minutes and never look back. Why? Because you won’t pollute your host operating system with development stuff, and you’ll be able to have an isolated PHP environment for every app you build. If you want to test on different versions of PHP, or you want some environments to have certain extensions while others don’t, no problem.

Learn to use Vagrant and you’ll never look back. Use the above link, trust me.

Though you have to backup all the projects (including any database[s]) that you’re working on in order to uninstall an old version of xampp in order to install a newer version of xampp, it can be annoying. I have been using xampp for 5 years straight with no real problems

Have you needed to install any extensions such as; ioncube, imagick, etc using Xamp? Do you use a debugger like xdebug? Have you needed to install ruby for compiling a css preprocessing language? Have you needed to install node for using grunt or bower? I assume you have never needed to work on multiple projects simultaneously with different versions of php, correct?

I have also used xampp for more than 5 years and I have never had a problem. I have also never had to install anything I could not and I work on multiple websites.
It is “horses for courses” but saying that I might have a look at other options now after reading the posts above.

Nope, I don’t tend to use frameworks, I don’t even know how to use them let alone want to use them.

Those aren’t frameworks per say.

If it a fair assumption that you work on projects with fairly small scopes and team members?

I think this is closer to the true answer… for now, I restored it to a few months ago before I started all the VM tutorials and it seemed to clear things up. Thanks for all the input and advice, I have been experimenting with puPHPet, but have had trouble adding a database into it. I tried Adminer once and seemed ok for a while…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.