Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up Apache, Perl, PHP & MySQL on Windows.

Apache, Perl, PHP and MySQL

Setting up Apache, Perl, PHP & MySQL on Windows.

by  Wullie  Posted    (Edited  )
This explains how to set up Apache with Perl, PHP, MySQL and Blat on Windows.

To start with, you can download apache from the following link.

www.apache.org/dist/httpd/binaries/win32/

Look for the latest no_src.exe file.

Run the installer, it should be self explanitory.

Now go to START > PROGRAMS and look for Apache. In that folder, you should see a dir called "Configure Apache Server", in there will be a file called httpd.conf. Open this file and read through it and make any changes as appropriate. (It is all well commented)

Now click on the "Start Apache In Console" that is in the apache dir. This should launch a command window that hopefully says "Apache/Version Number (Win32) running..."

If you get an error then check your httpd.conf file for typos..

Now, type http://localhost into your browser and you should see the default apache page.

Thats apache set up. (Well, nearly)

Search the httpd.conf file for "AddHandler cgi-script" and then change it to the following. If it is commented, then uncomment it.

AddHandler cgi-script .cgi .pl

Now go to www.activestate.com and download Perl..(You have to register but it is free)

Run the installer for this and install it to /usr/ or /usr/local/ or whatever suits you. Do not add the /bin/perl part as the installer automatically does this for you.

Now close apache by holding CTRL + C and then start it again. Everytime that you make a change to the httpd.conf, you must restart apache for the changes to take effect.

If all went well, you now have apache and perl set up and ready to use.

If you want to install PHP then go to http://www.php.net and look for the windows version.

Run the installer.

Now go back to your httpd.conf and add the following lines.


# Begin PHP
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
# End PHP

Change the paths if you did not install PHP to the default.

That should now be PHP set up..

On windows you cannot use sendmail, you can get alternatives but I have never seen a cheap one except Blat..

Blat can be found at www.interlog.com/~tcharron/

Download that and the readme should explain how to use it, there should also be a demo form there so that you know the correct syntax to use for your forms etc.

If you want MySql then you can find that at www.mysql.com/Downloads/

Run the installer.

Now go to the directory that you installed apache to (Default is C:\Program Files\Apache Group\Apache) and the directory named htdocs is where all of your html etc, files go. Your cgi-bin is in this apache directory also..

Now, that should be it all set up correctly and your server should be ready to go..

Good Luck!!

Wullie

sales@freshlookdesign.co.uk
www.freshlookdesign.co.uk
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top