Configuring your Macintosh system (PHP)
If you're a Macintosh user, you can run PHP pages on your computer using
the Apache web server and PHP application server installed with your
operating system. Configuring your system consists of making sure the web
server and PHP application server are working, and then creating a root
folder for your PHP files.
This section contains the following topics:
I
Testing the PHP installation (Macintosh) on page 309
I
Creating a root folder (Macintosh) on page 310
For more information on Apache and PHP on the Macintosh, see the
following websites:
I
http://developer.apple.com/internet/opensource/php.html
I
www.entropy.ch/software/macosx/php/
Testing the PHP installation (Macintosh)
You can test the Apache web server and PHP application server on your
Macintosh by running a test page.
However, before you can use the web server to serve PHP pages and
content from MySQL databases, you must configure the server to work
with PHP and MySQL. For information on this process, see
www.macromedia.com/go/php_macintosh
.
To test the Apache web server and PHP application server:
1.
Configure the server as described in the article on the Macromedia
website.
2.
In Dreamweaver or any text editor, create a plain text file and name it
timetest.php.
3.
In the file, enter the following code:
This page was created at
on the computer running PHP.
This code displays the time the page was processed on the server.
4.
Copy the file to the /Users/your_user_name/Sites folder on your
Macintosh.
This Sites folder is your personal root folder for the Apache web server.
Configuring your system (PHP) 309