- Impact
- 6
This tutorial is old and you can find a more up to date version here or here.
Go to Start --> Run --> Type MSIEXEC in the input box and hit enter to see if it's installed and what version. You need to have atleast version 2.0. You will see a message box that says "Incorrect command line parameters", along with the version number. You can install or upgrade with the following downloads if you need to: Windows Installer 2.0 Redistributable for Windows 95, 98, and Me
Windows Installer 2.0 Redistributable for Windows NT 4.0 and 2000:
STEP 2: Download and install the Apache Web Server:
http://nagoya.apache.org/dist/httpd/binaries/win32/ Download the latest stable release that ends with the .msi extension apache_2.X.XX-win32-x86-no_ssl.msi. Make sure the version you download has no_ssl or no_src in it. Click on the installation program you just downloaded until you see:
Welcome to the installation Wizard for Apache HTTP Server 2.0.43
Continue through the set up, accept the license agreement, continue until you get to the screen that says:
Server Information
Please enter your servers information
Enter "localhost" without the quotes in the Network Domain input box.
Enter "localhost" without the quotes in the Server Name input box.
Enter any email address you'd like to in the Administrator's Email input box.
Click Next --> Click Next
You'll have an option to change the installation to a different folder.
Click Change
Enter "C:" without the quotes for the folder name.
Click OK --> Click Next --> Click Install --> Click Finish
Apache should now be installed in the C:Apache2 directory.
STEP 3: Configure Apache to enable some good stuff.
Browser to the directory where the httpd.conf file is located: C:Apache2conf
Open up httpd.conf with your favirote text editor and:
3A Search For:
Options Indexes FollowSymLinks
Replace With:
Options Indexes FollowSymLinks MultiViews +Includes
3B Search For:
AllowOverride None
Replace With:
AllowOverride All
3C Search For:
DirectoryIndex index.html index.html.var
Replace With:
DirectoryIndex index.html index.html.var index.htm index.php index.shtml
3D Search For:
<Directory "C:/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Replace With:
<Directory "C:/Apache2/cgi-bin">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
3E Search For:
AddType application/x-tar .tgz
AddType image/x-icon .ico
Replace With:
AddType application/x-tar .tgz
AddType image/x-icon .ico
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
Action application/x-httpd-php /php/php.exe
3F Search For:
#AddHandler cgi-script .cgi
Replace With:
AddHandler cgi-script .cgi .pl
3G Search For:
#AddOutputFilter INCLUDES .shtml
Replace With:
AddOutputFilter INCLUDES .shtml
Jump down to step 7A to test and verify apache is working.
STEP 4: Download and install Perl:
http://activestate.com/Products/Download/Download.plex?id=ActivePerl ActivePerl 5.8.0 build 804 Windows MSI 11.5MB. Click on the Perl installation file you downloaded and accept the license agreement and continue until you come to the screen that says:
Custom Setup
Select the way you want features to be installed
Click the browse button and change the location from:
C:Perl
to:
C:usr
Click Next --> Click Next --> Click Next --> Click Install -->Wait for it to install --> Click Finish
Jump down to step 7B to test and verify Perl is working.
STEP 5: Download and Install PHP
http://www.php.net/downloads.php Scroll down until you see Windows Binaries. Download the latest stable zip version and not the installer version. PHP 4.3.0 zip package.
Unzip it to your: C: directory
Browse to your: C: directory and look for the folder named php-4.3.0-Win32. This maybe be different if you downloaded a different version.
Open up the php.ini-dist file located in the php-4.3.0-Win32 folder and:
Search For:
doc_root =
Replace With:
doc_root = "C:Apache2htdocs"
Search For:
extension_dir = ./
Replace with:
extension_dir = "c:phpextensions"
Save the php.ini-dist file and rename it to: php.ini
Now move the php.ini file into your: C:Windows directory.
Find the php4ts.dll file located in your: C:php directory and move it to your: C:Windows directory.
Rename the: C:php-4.3.0-Win32 folder to: php
Jump down to step 7C to test and verify PHP is working.
STEP 6: Download and Install MySQL
http://www.mysql.com/downloads/download.php?file=Downloads/MySQL-3.23/mysql-3.23.54-win.zip
Unzip the file you just downloaded to a temporary directory. If your using a program such as Winzip and it gives you the option to install now go ahead and do that and choose all the default settings.
If not browse to the temporary directory where you unzipped the files and click on the setup.exe file to start the installation. Continue through the installation with all the default settings until your done.
Jump down to step 7D to test and verify MySQL is working.
STEP 7: Test Everything:
7A: Test the Apache Web Server
Start Apache
You can start apache by going to the Start Menu -- > Apache -- > Start apache in console on Windows 98. This may be different for other versions.
You'll see a little Dos like screen appear if your using Windows 98
Open up a text file and throw some HTML in it:
Example:
<html>
<body>
Apache Web Server Test
</body>
</html>
Save it as index.html in your C:Apache2htdocs directory.
This is where all your html, graphics, and php files will go.
Go to http://127.0.0.1 or http://localhost in your favirote browser and see if it works.
Note: You can stop apache on Windows 98 by double clicking in the little black dos box and Pressing Ctrl+C
7B: Test Perl / CGI
Open up a text file and place some code in it:
Example:
#!/usr/bin/perl
print "Content-type: text/htmlnn";
print "Hello Perln";
Save it into your C:Apache2cgi-bin directory as: perltest.cgi
Go to http://127.0.0.1/cgi-bin/perltest.cgi and see if it works.
7C Test PHP:
Open up a text file and add the the following code to it:
<?php
phpinfo();
?>
Save it in your C:Apache2htdocs directory as phpinfo.php
Browse to:
http://127.0.0.1/phpinfo.php and see if it works.
7D Test MySQL:
Browse to your C:mysqlbin directory and Click on the winmysqladmin.exe file.
This should launch a graphical user interface that you can use
to edit configuration files, and maintain and monitor your MySQL server.
You should see a screen with:
Create the mysql.ini file with default values and the user below. Reccomended to novice user. Enter a username and password that you will remember Click Ok.
You'll see a stoplight icon in your taskbar
You can stop the MySQL server and/or the WinMySQLAdmin tool by right clicking on the icon.
To login to the MysQL server from the command line:
Go to the Start menu -- > selct run.
Type dosprmpt in the input box to open up the command-line interface, or if that doesn't work try typing cmd in the input box.
That should open up a dos like screen.
Change your directory to the bin directory of MySQL by typing:
cd c:mysqlbin
And pressing enter.
Now you can type mysql and press enter to start the MySQL monitor. You should see something like:
Welcome to the MySQL monitor. Commands end with ; or g. and some more stuff. If you see that then you know MySQL is working.
You can use the MySQL administration tools like mysqladmin and mysqldump from the command-line to create, drop, dump, and restore databases and alot more.
To get a complete list of mysqladmin commands type the following at the prompt:
#prompt> mysqladmin --help
If you plan on running scripts that connect to a MySQL database you usually need to enter a database name in the config file of the script. If you just make up a name and run the install file for the script, it may create the database for you. If not you can either use the database name: test, or create one using the mysqladmin tool.
You don't need to enter a username or a password in the config file. You can use localhost as the database hostname or server name.
Okay that's all for now, I'll try and update this tutorial every so often, so keep checking back for updates!.
Code:
//
//
//Tutorial by deadserious - © [url]http://www.webdesigntalk.net[/url]
//© 2003 [url]http://www.webdesigntalk.net[/url]
//REPUBLICATION OF THE TUTORIAL REQUIRES OUR PERMISSION.
//[email protected]
//
//
//
NOTES:
- Click Here to view this tutorial outside the forum.
- This tutorial was written using a Windows 98 Machine. The same basic steps should work on Windows ME/2000/XP.
- If installing on another Windows version certain things will be slightly different such as how you stop and start services, but you should be able to figure it out.
- This tutorial used the latest versions of Apache and PHP which aren't fully supported/tested yet, but well this is just for learning and testing on your home computer and everyone will eventually need to upgrade to these versions anyways.
- This tutorial shows you how to set up PHP as a CGI binary. I havn't succeded in setting up PHP as an Apache module with Apache 2.0 on Windows yet, but if and when I do I'll update this tutorial.
- This tutorial was set up to make things similar to most hosts out there. So when you're done testing your scripts and pages you wont have to make so many changes when you're ready to upload them on to your hosts server.
Go to Start --> Run --> Type MSIEXEC in the input box and hit enter to see if it's installed and what version. You need to have atleast version 2.0. You will see a message box that says "Incorrect command line parameters", along with the version number. You can install or upgrade with the following downloads if you need to: Windows Installer 2.0 Redistributable for Windows 95, 98, and Me
Windows Installer 2.0 Redistributable for Windows NT 4.0 and 2000:
STEP 2: Download and install the Apache Web Server:
http://nagoya.apache.org/dist/httpd/binaries/win32/ Download the latest stable release that ends with the .msi extension apache_2.X.XX-win32-x86-no_ssl.msi. Make sure the version you download has no_ssl or no_src in it. Click on the installation program you just downloaded until you see:
Welcome to the installation Wizard for Apache HTTP Server 2.0.43
Continue through the set up, accept the license agreement, continue until you get to the screen that says:
Server Information
Please enter your servers information
Enter "localhost" without the quotes in the Network Domain input box.
Enter "localhost" without the quotes in the Server Name input box.
Enter any email address you'd like to in the Administrator's Email input box.
Click Next --> Click Next
You'll have an option to change the installation to a different folder.
Click Change
Enter "C:" without the quotes for the folder name.
Click OK --> Click Next --> Click Install --> Click Finish
Apache should now be installed in the C:Apache2 directory.
STEP 3: Configure Apache to enable some good stuff.
Browser to the directory where the httpd.conf file is located: C:Apache2conf
Open up httpd.conf with your favirote text editor and:
3A Search For:
Options Indexes FollowSymLinks
Replace With:
Options Indexes FollowSymLinks MultiViews +Includes
3B Search For:
AllowOverride None
Replace With:
AllowOverride All
3C Search For:
DirectoryIndex index.html index.html.var
Replace With:
DirectoryIndex index.html index.html.var index.htm index.php index.shtml
3D Search For:
<Directory "C:/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Replace With:
<Directory "C:/Apache2/cgi-bin">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
3E Search For:
AddType application/x-tar .tgz
AddType image/x-icon .ico
Replace With:
AddType application/x-tar .tgz
AddType image/x-icon .ico
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
Action application/x-httpd-php /php/php.exe
3F Search For:
#AddHandler cgi-script .cgi
Replace With:
AddHandler cgi-script .cgi .pl
3G Search For:
#AddOutputFilter INCLUDES .shtml
Replace With:
AddOutputFilter INCLUDES .shtml
Jump down to step 7A to test and verify apache is working.
STEP 4: Download and install Perl:
http://activestate.com/Products/Download/Download.plex?id=ActivePerl ActivePerl 5.8.0 build 804 Windows MSI 11.5MB. Click on the Perl installation file you downloaded and accept the license agreement and continue until you come to the screen that says:
Custom Setup
Select the way you want features to be installed
Click the browse button and change the location from:
C:Perl
to:
C:usr
Click Next --> Click Next --> Click Next --> Click Install -->Wait for it to install --> Click Finish
Jump down to step 7B to test and verify Perl is working.
STEP 5: Download and Install PHP
http://www.php.net/downloads.php Scroll down until you see Windows Binaries. Download the latest stable zip version and not the installer version. PHP 4.3.0 zip package.
Unzip it to your: C: directory
Browse to your: C: directory and look for the folder named php-4.3.0-Win32. This maybe be different if you downloaded a different version.
Open up the php.ini-dist file located in the php-4.3.0-Win32 folder and:
Search For:
doc_root =
Replace With:
doc_root = "C:Apache2htdocs"
Search For:
extension_dir = ./
Replace with:
extension_dir = "c:phpextensions"
Save the php.ini-dist file and rename it to: php.ini
Now move the php.ini file into your: C:Windows directory.
Find the php4ts.dll file located in your: C:php directory and move it to your: C:Windows directory.
Rename the: C:php-4.3.0-Win32 folder to: php
Jump down to step 7C to test and verify PHP is working.
STEP 6: Download and Install MySQL
http://www.mysql.com/downloads/download.php?file=Downloads/MySQL-3.23/mysql-3.23.54-win.zip
Unzip the file you just downloaded to a temporary directory. If your using a program such as Winzip and it gives you the option to install now go ahead and do that and choose all the default settings.
If not browse to the temporary directory where you unzipped the files and click on the setup.exe file to start the installation. Continue through the installation with all the default settings until your done.
Jump down to step 7D to test and verify MySQL is working.
STEP 7: Test Everything:
7A: Test the Apache Web Server
Start Apache
You can start apache by going to the Start Menu -- > Apache -- > Start apache in console on Windows 98. This may be different for other versions.
You'll see a little Dos like screen appear if your using Windows 98
Open up a text file and throw some HTML in it:
Example:
<html>
<body>
Apache Web Server Test
</body>
</html>
Save it as index.html in your C:Apache2htdocs directory.
This is where all your html, graphics, and php files will go.
Go to http://127.0.0.1 or http://localhost in your favirote browser and see if it works.
Note: You can stop apache on Windows 98 by double clicking in the little black dos box and Pressing Ctrl+C
7B: Test Perl / CGI
Open up a text file and place some code in it:
Example:
#!/usr/bin/perl
print "Content-type: text/htmlnn";
print "Hello Perln";
Save it into your C:Apache2cgi-bin directory as: perltest.cgi
Go to http://127.0.0.1/cgi-bin/perltest.cgi and see if it works.
7C Test PHP:
Open up a text file and add the the following code to it:
<?php
phpinfo();
?>
Save it in your C:Apache2htdocs directory as phpinfo.php
Browse to:
http://127.0.0.1/phpinfo.php and see if it works.
7D Test MySQL:
Browse to your C:mysqlbin directory and Click on the winmysqladmin.exe file.
This should launch a graphical user interface that you can use
to edit configuration files, and maintain and monitor your MySQL server.
You should see a screen with:
Create the mysql.ini file with default values and the user below. Reccomended to novice user. Enter a username and password that you will remember Click Ok.
You'll see a stoplight icon in your taskbar
You can stop the MySQL server and/or the WinMySQLAdmin tool by right clicking on the icon.
To login to the MysQL server from the command line:
Go to the Start menu -- > selct run.
Type dosprmpt in the input box to open up the command-line interface, or if that doesn't work try typing cmd in the input box.
That should open up a dos like screen.
Change your directory to the bin directory of MySQL by typing:
cd c:mysqlbin
And pressing enter.
Now you can type mysql and press enter to start the MySQL monitor. You should see something like:
Welcome to the MySQL monitor. Commands end with ; or g. and some more stuff. If you see that then you know MySQL is working.
You can use the MySQL administration tools like mysqladmin and mysqldump from the command-line to create, drop, dump, and restore databases and alot more.
To get a complete list of mysqladmin commands type the following at the prompt:
#prompt> mysqladmin --help
If you plan on running scripts that connect to a MySQL database you usually need to enter a database name in the config file of the script. If you just make up a name and run the install file for the script, it may create the database for you. If not you can either use the database name: test, or create one using the mysqladmin tool.
You don't need to enter a username or a password in the config file. You can use localhost as the database hostname or server name.
Okay that's all for now, I'll try and update this tutorial every so often, so keep checking back for updates!.
Last edited: