AlfieWebDevTips Homefor new and experienced developers
[Home Home] [Web Development Web Development ] [Code Generators Code Generators ] [Resources Resources ] [Contact Us Contact ] |WebDevTips Privacy Privacy |
Print This Page

You are here : Home - Web Development - Home Server - PHP

Install PHP



PHP

PHP scripting language is a must have tool you can download it from http://www.php.net/downloads.php. Download the PHP x.x.x installer

The PHP homepage can be found at http://www.php.net/


Begin the installation


Select standard installation


Install to DRIVE:\web\php - use the browse button - make sure your path looks like this




I don't plan on using mail on the development server for now so just proceed with the defaults - if you do then just enter the required information


Make sure you select Apache from the list


Click next to install.


Before we test php we have to do 2 things

1. We need to let the server know that we want to use php. Open DRIVE:\web\Apache2\conf\httpd.conf in a text editor (one that shows line numbers makes this part easier)

We need to add 2 lines between the <Directory /></Directory> tags.

Change
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

to

<Directory />
Options FollowSymLinks
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
AllowOverride None
</Directory>


We also need to add this line (512)
ScriptAlias /php/ "DRIVE:/web/php/"


Look for the following (around line 323)

DirectoryIndex index.html index.html.var

Change this to

DirectoryIndex index.html index.php index.shtml index.html.var

This sets the file that Apache will serve if a directory is requested - priority is given in the order from first to last.

Save httpd.conf and restart the server (use Apache Service Monitor)

next Copy and paste this into your text editor


<?
echo "hello world!";
exit;
?>



Save it as DRIVE:\web\Apaches2\htdocs\hello.php

Open your browser and type http://localhost/hello.php into the address bar. If all has went well you should see the words Hello World! in your browser.

If you don't see the hello world text then retrace your steps. Make sure that you have made all the changes to httpd.conf and restarted the server.

Next we'll move on to Step 5 - enable server side includes


Setting up a home development server
Step 1 Download all the software
Step 2 install and test Apache
Step 3 install and test Perl
Step 4 install and test php
Step 5 enable server side includes and test
Step 6 install and test mysql
Step 7 install and test phpbb
Step 8 well done
Why not discuss this article in our forum?
Get your questions answered quickly.

24-May-2003




Google
 

[back to top of page]   

[labelled with icra -  - this link will open in a new window] [RSS Content]

[Copyright © WebDevTips]