Questions about installing php

I'd like to be able to run PHP application on my own windows desktop.

What are my options? accodring to this reference, I have to install visual studio 2015 to able to do it. Is it the really necessary?

  1. Why do they mention compiling php? it's a scripting language so am I still supposed to pre-compile it before running it?
  2. Is Visual Studio the only editor or there are other suggested IDEs?
  3. Do I have to run it on IIS, can't I install apache server on my desktop and run the php application on it?


The instructions you find on the wiki are for building PHP from source, but you don't have to do that to use PHP on Windows.

You can use one of the WAMP/XAMPP packages mentioned in the comments. That's definitely a quick and convenient way to get it working on your system. But if you really just want to put PHP on your Windows machine without using one of those, it really isn't too hard.

Based on your questions, including:

Why do they mention compiling php?

I think I can safely assume that you don't want to compile PHP. Fortunately, you don't have to.

Just go to the PHP for Windows download page and find the version that will work on your system. The "Which version do I choose?" in the left panel will help you figure out which one you need. These are pretty much ready to use, just extract it where you want it (I usually just do C:\PHP).

You will need to have the appropriate C++ redistributable installed before it will work. There are also links to those on the PHP for Windows page that I linked above. If you chose PHP 7 (why not?) it will be the VC14 version.

After you have installed the C++ redistributable and extracted the PHP zip file you downloaded, add the new PHP directory to your Windows path, and you'll be able to use PHP on the command line. You can test that it's working properly with php -v (displays the installed version) in a cmd window.

To configure your PHP installation, start with one of the provided ini files, either php.ini-development or php.ini-production. Make a copy of the one you want to use and rename it to php.ini.

Of course, this is only PHP. If you want to use it to with Apache or some other web server, you'll need to install that separately and configure it to use your PHP installation. It's not difficult after you have some experience with it, but I remember it being pretty frustrating to get it working the first time. The advantage to using XAMPP or similar is that includes Apache and MySQL with one installer. If you're just starting out, that's definitely the easiest way to get going.

As far as IDEs, there are various ones that support PHP. There are some free ones that are fine, if that matters to you, but all you really need is a good text editor.


 ? I'm having trouble with this exercise on hacker rank please look
 ? Can't set date on Android (ADB)
 ? Copy values one MySQL column to another, but formatted
 ? PostSharp - System.InvalidOperationException when applying to mscorlib -> System.DateTime
 ? Converting date format format from dd/mm/yyyy to yyyy/mm/dd using C
 ? Convert DateInterval object to seconds in php
 ? IE Input type Date not appearing as Date Picker
 ? Different behavior of PeriodFormatter on different devices (JodaTime)
 ? how to split date and time from same column in csv using python?
 ? PHP zero out the time for a date and add 3 days