|
If you want your web site to link within
my web site then email me to exchange link
with my web site
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 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. Most web hosts offer PHP support, but if your
host does not consider reading the
PHP Links section for resources on finding PHP enabled
web hosts.
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. Locate a pre-configured package 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 Linux and Windows. On Linux,
you may find rpmfind and
PBone helpful for
locating RPMs.
User
Contributed Notes
A simple tutorial
riquez
08-Dec-2003 01:17
fukuman is right - go for "Complete MySQL" - it's a breeze to install (just follow the instructions provided) & minimises your need to use the terminal. It's exactly the same as the official MySQL, but just has a handy installer.
Another great bit of software to look out for is "CocoaMySQL" it will give you an easy to use interface to manage your MySQL databases, set up tables, fields etc)
These 2 bits of software I definately recommend if your starting out with MySQL!
28-Nov-2003 09:14
Another good place to start is http://www.allsyntax.com and get more information on PHP and working with MySQL. Also, pay a visit to www.mysql.com and the newest version is available
gr33dy
28-Nov-2003 09:52
A free and easy web server to install is http://www.aprelium.com. It is easy to configure using an html control panel, and the support is excellent.
I also recommend using a DNS service, such as http://www.microtech.co.gg/dns which will give you a URL such as www.mysite.DNSservice.com - much easier if you have a dynamic I.P. address.
Walrus99
24-Oct-2003 11:08
More for OS X Users,
The book "Mac OS X" by J. Ray and W. Ray has a good chapter on gettng PHP going on OS X 10.2. PHP is already installed on OS X 10.2. It just requires some changes in the configuration file for Apache.
http://www.mysql.com/ has MySQL 4.0 available for download for OS X as a dmg file, which is very easy to install. http://www.mysql.com/downloads/mysql-4.0.html
I wouldn't try this if you are a novice, but if you have experience using the terminal, databases, and a scripting language, this is a quick and easy way to start learning PHP and MySQL. I was able to get a page on the server that accessed a database in MySQL in a few hours of work. Be careful of security measures.
I am not sure if PHP is on 10.3, but I assume it will be. It is not on versions before 10.2.
fukuman
28-Sep-2003 08:25
Mac OS X users,
a good place to start is with this site:
http://www.serverlogistics.com/
then you can get the Complete PHP , Complete Apache2, and Complete MySQL packages.
please note the default Apache in OS X is 1.3.27 so enabling Apache2 you don't turn on SystemPref>>Sharing>>PersonalWebSharing. consult the docs that come with the downloads. It's pretty easy to do. all install nicely and are enabled. They install into /Library/Apache2, /Library/MySQL/ and /Library/PHP4/
the Install Guide.pdf for each package documents the installs excellently. and the Apache2 and MySQL packages come with a preference pane to easily control the starting of the msqld and apache2 webserver.
So do yourself a favour. use the ServerLogistics packages.
|
|
|
|