Click to See Complete Forum and Search --> : Heeeeeelp! (HTTP Program) Yech!


comingbackdown
12-02-2006, 02:01 AM
Okay, I'm starting PHP. I learned the barebones essentials of what I need for it, (HTTP Program, and the PHP installer.) One little problem. I was recommended Apache as the HTTP program... I have no idea how to install and configure it on windows. Help me out. I'm on XP Home Edition, service pack 1, soon to be service pack 2 (I know, I should've gotten it when it was released...)

I need to know how to install Apache, how to configure it, and it all has to be done on one machine. Mine. I have not the slightest notion of how to set up a server application to view webpages on the same machine it's on. (I'm a noob to server-side scripting)

Also, is there any way I could set my computer up so that a friend (pro web developer) could tap into my computer across the internet, and view my pages to see my progress on my learning, and on my personal website? I know that it would take a while without high speed internet, and that he'd have to have access to Apache and PHP to view them... Also, is there anyway (other than IIS) to run .ASP files? I'd like to learn it as well, but... If I can't run it, I'm kinda screwed...

coppocks
12-02-2006, 03:03 AM
Go to...

http://httpd.apache.org/

And download the Win32 Binary (MSI Installer) and simply install it. It'll prompt you if it needs any input from you, such as email address, Port 80 etc ... but just use the defaults and you should be fine. Your homepage under the default would be http://localhost

It'll probably install it somewhere like C:\Program Files\Apache Group\Apache ~OR~
C:\Program Files\Apache Group\Apache2 depending on the version you choose, or I believe you can dictate your own default directory.

Your website files will then reside inside in the directory of C:\Program Files\Apache Group\Apache\htdocs

The Apache site has a FAQs Section for Windows Installation and Usage as well.

In the end, if you can get a page to load with http://localhost then you're on your way.

After you've installed PHP, if it doesn't work, open C:\Program Files\Apache Group\Apache\conf\httpd.conf in a TEXT EDITOR and add the following to the bottom of the file if it doesn't already exist:


ScriptAlias /php/ "C:/php/"
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC C:/php
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>


Locate this:

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>


and make it look like this (if it doesn't already):

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>


It's been so long since I've had to install this I don't recall whether PHP alters that file duiring installation or not, but I doubt it. Someone else may be able to answer that.

Hope this helps.

Fang
12-02-2006, 03:24 AM
Install all in one go: Wamp (http://www.wampserver.com/en/) or Xampp (http://www.apachefriends.org/en/xampp-windows.html)

drhowarddrfine
12-02-2006, 08:19 AM
You really need to learn how to set it up from scratch. Eventually, you'll need to change a setting somewhere and if you let some installation program do it all for you, you'll never know where to look or understand what is happening.