PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousWhat can PHP do? Your first PHP-enabled pagenext
Last updated: Sat, 26 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Brazilian Portuguese | Chinese | Czech | Dutch | German | Hungarian | Italian | Japanese | Korean | Polish | Russian | Slovak | Spanish | Swedish

Chapter 2. A simple tutorial

Here we would like to show the very basics of PHP in a short simple tutorial. This text only deals with dynamic webpage creation with PHP, though PHP is not only capable of creating webpages. See the section titled What can PHP do for more information.

PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages.

What do I need?

In this tutorial we assume that your server has support for PHP activated 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 don't need to do anything. Just create your .php files and put them in your web directory and the server will magically 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.

User Contributed Notes
A simple tutorial
add a note about notes
Matthew at ggraham2 dot fsnet dot co dot uk
27-Aug-2002 03:34

Bear in mind that PHP is a service that the web server has to provide. Most free web-page hosts, and ISPs giving space will not support PHP.
gecko_mayhem at hotmail dot com
30-Aug-2002 04:21

It would be wise to set up a server (such as Apache) and a database (such as MySQL) on your own back-end desktop in order to create PHP webpages - this will allow for testing and configuration without the hassle of multiple ftping...
robertfdavis at NO_SPAMtriadrr dot com
15-Sep-2002 02:43

Just a comment - there is not one particular webserver you have to install. Just make sure the webserver can support PHP requests. You will need PHP - and can download it from here. I have just started testing Dreamweaver MX with PHP and MySQL support. So far so good. Have fun with it!
I am running Mac OS 10.2 (Jaguar) w/Apache and PHP with a MySQL database on a PowerBook G3 (Pizmo).

matthijs at rohs dot nl
16-Sep-2002 11:50

The best combination (imho) is Apache 1.3.26 with the latest PHP (e.g. 4.2.3) and the latest MySQL (e.g. 3.23.52). Apache 2.0.x seems to have a lot of problems with PHP, so I prefer 1.3.26.

> Comment: There won't be a newer Apache 1 version as 1.3.26, since they are developing 2.0.x and making that one stable. So this comment is up to date at any time :) Thank you Nicos.

tomreed at sundial dot net
16-Sep-2002 11:30

Just thought you should know, there are several installation packages available from the Australian site http://www.firepages.com.au/ called "php4dev." They provide various combinations of PHP, Apache and mySQL that will run on Windows systems. They are all pre-configured and should work instantly after unzipping. (Unfortunately, the package I got has an obsolete version of phpMyAdmin, and I can't get the infernal current version configured to work.) However, it is an easy way to install the whole works.
jackwendel at hotmail dot com
07-Oct-2002 12:53

I tell my students about FoxServ for installing PHP, MySQL and Apache on Windows. One executable and it's all done.
http://sourceforge.net/projects/foxserv

munkeh at hotmail dot com
12-Oct-2002 10:43

Theres a site that gives a list of free php webspace providers at http://www.free-php-hosting.com/ - may be worth bearing in mind if you can't (or don't want to) run your own server.
vanbregt at freeler dot nl
15-Oct-2002 04:49

I found that EasyPHP (http://www.easyphp.org/) provides a nice way to develop php offline.
sunny_vk at go dot com
16-Oct-2002 12:37

The best way to develop PHP + MySQL offline is by downloading the PHP-Triad comprising of the PHP binary+MySQL+Apache server for windows. To get it go to www.download.com and search for phptriad
Derek at kernelPanic at kernel dot net
21-Oct-2002 06:24

I opted for much smaller, less resource intensive and therefore swifter solution. My setup includes the following:

1. PHP 4.2.3 (of course)
2. Xitami Web Server - small and snappy
3. Interbase - a 2MB download from www.ibphoenix.com. It's TRULY FREE (unlike MySQL), has triggers, stored procedures, Userdefined Libs etc, etc.

add a note about notes
previousWhat can PHP do? Your first PHP-enabled pagenext
Last updated: Sat, 26 Oct 2002
show source | credits | mirror sites
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: egateDOMAINS
Last updated: Tue Oct 29 18:35:00 2002 EST
Hosted by www.Geocities.ws

1