First off i found this tutorial on the web i didn't write it but it's very easy to follow and is made for the new released PHP5
1 Apache
Before you continue, make sure you have:
1) A broadband internet connection (cable or dsl) that is always on.
2) A computer running Windows NT, 2000, or XP (preferably that you can keep on 24/7).
If you want to run a server on Windows 9x or ME, use Apache 1.3.x instead.
The installation process is similar, but not exactly the same as 2.0. Running servers on Windows 9x or ME is not recommended.
Installing Apache 2.0.x:
1) Download the Apache MSI installer. Here is a link to the current version at the time of this writing.
http://apache.mirrors.versehost.com/...x86-no_ssl.msi
2) Find out your internet IP address.
http://www.whatismyip.com will tell you, although it is not always reliable...
3) Double click on the file you just downloaded. Click on the Next button until you reach a screen called "Server Information."
Type your internet IP in the first two boxes, and your E-Mail address in the last.
Leave the first radio button checked - run as a service on port 80.
4) Choose "Typical" and click next, then click install.
5) Now Apache is installed and running on your computer. Go to your browser and type "localhost" to make sure.
A page should come up saying that Apache was successfully installed.
6) ONLY IF YOU HAVE A ROUTER: Go to your router's config page (usually 192.168.1.1) and forward port 80 to the computer running Apache.
ONLY IF YOU HAVE A FIREWALL: Set your firewall to allow incoming connections on port 80.
7) Now you should be able to connect to your webpage using your Internet IP. Try it by typing your internet IP in your browser.
8) Move the contents of the webpage you made into the folder:
c:\Program Files\Apache Group\Apache2\htdocs\
Now your actual webpage will show up when you go to your Internet IP address.
For other people to access your site, they'll have to type your IP address in their browser.
Instead, you could use a free DNS service, such as yi.org, or no-ip.com.
Note about port 80:
Many ISPs block connections on port 80 to stop people from running their own servers.
If your ISP does this, just run Apache on a different port, such as 99.
To do this, open httpd.conf with notepad, and change the line Listen 80 to Listen 99 (then restart Apache).
Add :99 to the end of your IP address or DNS address (
http://justin.yi.org:99 for example).
Some general tips:
1) Any time you edit the httpd.conf file, you must restart Apache for the changes to take effect.
2) If you are running Apache on a port besides 80, you must put http:// before the address.
(
http://localhost:99, NOT localhost:99.)
3) If you can get to your website but no one else can, make sure your router is forwarding that port, and that the port isn't blocked.
2 PHP5
1) Download the PHP zip file.
Here is a link to the latest version at the time of this writing.
http://us2.php.net/distributions/php-5.0.0-Win32.zip
2) Extract the ZIP file to a directory of your choice.
3) Using notepad, open this file:
c:\Program Files\Apache Group\Apache2\conf\httpd.conf
4) Add these lines to it, right below the other LoadModule lines:
LoadModule php5_module "c:/php-5.0.0-Win32/php5apache2.dll" #(change the path to wherever the file is)
AddType application/x-httpd-php .php .phtml .inc .php3
AddType application/x-httpd-php-source .phps
5) For Apache to use index.php as the default index page, change the line
DirectoryIndex index.html index.html.var
to
DirectoryIndex index.php index.html index.htm index.html.var
6) Copy the file "php5ts.dll" to c:\Program Files\Apache Group\Apache2\bin\
7) Copy the file "php.ini-recommended" to c:\Program Files\Apache Group\Apache2\ and rename it to "php.ini"
8) For PHP sessions to work properly, you need to specify where to save the sessions.
Edit the php.ini file, and find the setting for session.save_path. Set it to "c:\windows\temp\" or another folder you use as a temp directory.
9) Restart Apache server:
Go to start -> run -> services.msc
Right click on Apache2 and choose Restart.
3 Mysql
1) Download the installer:
http://dev.mysql.com/get/Downloads/M...isc.edu/mysql/
2) Unzip this file to any folder, then double click on SETUP.EXE.
3) Leave all the default options, and keep clicking next.
After all the files are done installing, click Finish.
4) Go to start -> run -> services.msc, and start MySQL if it is not already started.
5) To add a database, go to start -> run -> cmd.
Type this command:
C:\mysql\bin\mysqladmin.exe create [database name]
(Replace [database name] with the name of the database you want to create.)
6) When using MySQL with PHP, the server address is always 127.0.0.1
Sony