FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


installing apache,mysql and php on windows





akshar
here is go...

Install Apache

Download Apache from Apache website: http://httpd.apache.org/download.cgi

Download this one

Win32 Binary (MSI Installer)

Run the exe file...

Follow the instructions...
Wait for it to finish...

Once it is done...
Test it by typing http://localhost/ in your web browser

it should show somehting like
Done, this mean it is working...

I know, I know, you must be thinking where the hell is www directory...

by default it is stored in

C:\Program Files\Apache Group\Apache2\htdocs

Replace C drive with youur default drive...

You can place the files you want to show it on the server..

I would suggest that you shall change the path of default www directory to some other drive..

the reason for this being, sometimes virus may currept default windows drive...and sometimes even autmatically format the drive too

so it is better to keep the dir in differenr drive..

to change location of the www directory, do this..

Start - Prog Files - Apache HTTP Server.... - Configure Apache Web Server - Edit the Apache httpd.conf Configuration File

Open the file..

Search for DocumentRoot

replace the path with the path you want...

done...

restart the server....

Start - Prog Files - Apache HTTP Server.... - Control Apache Web Server - Restart

done...

So you got apache working fine with your new www directory...

let's move on to PHP

Download PHP from PHP website: http://www.php.net/downloads.php

Download PHP 4.x.xx installer

Once you have downloaded it...
While installing select Advacned Mode

and there you will see option something like Display Notice, Warning etc...

Select Display All Errors (No need to display warnings and notice)

In the end from server list select Apache

It will show some alert box..
click on ok....

all done ?

Nah one thing left...

Now you will need to edit httpd.conf file to get php working

nothing much to worry, pretty simple...

For CGI based php

Code:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"


add above lines into the httpd.conf and then restart the apache

if you have installed php 5 then you will need to point replace last line with this

Action application/x-httpd-php "/php/php-cgi.exe"

Edit: Thanks to kalpik for this.

You can also install php as apache module..for that you need to add follwoing code in httpd.conf instead of above mentioned one...

Code:
# For PHP 4 do something like this:
LoadModule php4_module "c:/php/php4apache2.dll"
AddType application/x-httpd-php .php

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"



now to check whether PHP is installed or not,make one php file and see...

you can use this code

Code:
<?php
phpinfo();
?>


save it as index.php and save it in your www directory...

it should show file with php information...

all done Smile

I hope you guys found it easy....

I have not checked it for spelling mistakes coz writing in hurry so please excuse me for that Wink
Quote:
I have copied this tutorial from another site
elekis
very good but do you know that easier way

http://www.easyphp.org/

download, click next, thats all.


a+++
kimi1974
The easiest is polish pack www.krasnal.tk Smile
But any pack is not good for profesional use.
if have 100 users online my pc is dead... Sad
Keshav
Thank you for the tutorial! It will be very useful to me.
romano
Very good tutorial.
But with easyphp everything is simple.
And i like simple things
Aimewitue
me too
easyphp is the most simple way to install it but thank for the tuto
riv_
I've tried a few and had some problems (wamp, easy php, and done it manually) I'm glad I did it all from scratch, because I learned a lot. But when I got me new system, I didn't want to spend all that time setting up.
I found NuSphere's TechPlatform for Windows or Linux. It includes, php, Apache, Zend, and Perl. It is shockingly easy to install, and it works!!!! I recommend it highly!
You can download it for free at http://shop.nusphere.com/customer/home.php?cat=1
Related topics
How to install PHP and Apache in 5 min on Win98
NEW forum HELP
Installing, PHP, apache, mysql, phpmyadmin & zend optimi
Make your own PHP/APACHE/MySQL server at home.
apache php and mysql on mac OS X
MySQL, PHP and APACHE
Setting up a local PHP and MySQL Workspace
Installing Apache on Home Computer
PHP/Mysql - beginner!
server with ready PHP
If you want use PHP 5.1.4 with Apache 2.2.2 for windows
Option to suspend hosting
What software do you install first on a new computer?
how to set up a server
Reply to topic    Frihost Forum Index -> Miscellaneous -> Tutorials

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.