What do I need?

In this tutorial we assume that your server has activated support for PHP and that all files ending in .php are handled by PHP. On most servers, this is the default extension for PHP files, but ask your server administrator to be sure. If your server supports PHP, then you do not need to do anything. Just create your .php files, put them in your web directory and the server will automatically parse them for you. There is no need to compile anything nor do you need to install any extra tools. Think of these PHP-enabled files as simple HTML files with a whole new family of magical tags that let you do all sorts of things.

Let us say you want to save precious bandwidth and develop locally. In this case, you will want to install a web server, such as » Apache, and of course » PHP. You will most likely want to install a database as well, such as » MySQL.

You can either install these individually or choose a simpler way. Our manual has installation instructions for PHP (assuming you already have some web server set up). If you have problems with installing PHP yourself, we would suggest you ask your questions on our » installation mailing list. If you choose to go on the simpler route, then » locate a pre-configured package for your operating system, which automatically installs all of these with just a few mouse clicks. It is easy to setup a web server with PHP support on any operating system, including MacOSX, Linux and Windows. On Linux, you may find » rpmfind and » PBone helpful for locating RPMs. You may also want to visit » apt-get to find packages for Debian.

add a note add a note

User Contributed Notes 13 notes

up
19
wojciech dot fornal at gmail dot com
2 months ago
For really simple ad hoc server working at any location you want, you can use PHP's built-in web server (available since PHP 5.4.0). Just run in the shell/cli in a directory where you have your .php files:

$ php -S localhost:8000

This will run PHP built-in server on your localhost and port 8000. If you want to learn more about available options you can use --help flag.

$ php --help

Please note that enabling directory listing requires additional effort.
up
20
chris_evans at tesco dot net
6 months ago
On Windows I found WampServer an extremely easy install for Apache, PHP and MySQL and thought it may deserve a mention on this topic.  Available at http://www.wampserver.com/en/.
up
0
gaodacheng22 at gmail dot com
5 days ago
One word on this page -- "在任何操作系统下建立有 PHP 支持的 web 服务器都十分简单,包括 MacOSX、Linux 和 Windiws",  "windiws" maybe spelled "windows".
up
-1
BIGBEN
22 days ago
Use LAMP in Linux and install it with tasksel easy to go
up
-9
spiderg at email dot com
6 months ago
If you want to use PHP on Windows, you can use the oficial PHP implementation of Windows, through Microsoft Web Platform. Is free and is integrated with IIS. Check the url http://php.iis.net/
up
-18
rahularora dot net at gmail dot com
6 months ago
Get PHP up and running with WAMP on Windows, MAMP on Mac, LAMP on Linux.
up
-23
Anonymous
6 months ago
Easy PHP does not install any service and can be run just as needed: http://www.easyphp.org/
up
-16
me at hemantmaurya dot com
4 months ago
------------------------ MAC OSX ------------------------
Users are always confused that Should they Use MAMP Or XAMP may be sometimes WAMP.

MAMP Got very few updates but xamp Got timely Updated.
up
-89
bloggernitscomp54engg[at]gmail(dot)com
10 months ago
mostly wamp install in window. easy to configure and very easy to use.
up
-87
peaceinoffice at gmail dot com
9 months ago
I use OpenServer is easy to configure and have same extra tools
up
-118
josejayesh at gmail dot com
1 year ago
Use vagrant (http://www.vagrantup.com/ ) , https://www.virtualbox.org/ and https://puphpet.com/ to setup the environment
up
-135
ddiipp at outlook dot com
1 year ago
Use Xampp or Wamp in windows,linux. And MAMP in Mac
up
-211
info at fahdi dot tk
1 year ago
Hey , get yourself WAMP for fast forwarding on this one.
To Top