PHP and Apache

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

PHP and Apache

Post by youngblood »

Wondering if anyone can help me. I am trying to set up an Apache 1.3.3 server and enable PHP with it. I have got Apache installed. Then I installed PHP 5. I read the install and grabbed the two lines of code and entered it into to proper locations by loadmodule and addmodule. But after I restarted the server it still doesn't recognize any PHP scripts. Does anyone know what I did wrong or what I might still need to do?


thanks in advance!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
:?:


Moved to Web Servers.
youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

Post by youngblood »

^^^^



Is that what I should add to the apache config?? Sorry a lil confused by your post.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

to work with the modules, yes. Otherwise you have to use CGI mode, which is slow.
youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

Post by youngblood »

Still doesn't seem to work :(


I am using Apache 1.3.3 and php 5 are they compatible?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

have you tried following the direction here:
http://php.net/install.windows.apache1
youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

Post by youngblood »

# Add to the end of the LoadModule section
LoadModule php5_module "C:/php/php5apache.dll"

# Add to the end of the AddModule section
AddModule mod_php5.c


These are the two lines i mention in first post. the only thing that confuses me is that "php5apache.dll" is not in the php directory after install?? i have "php5ts.dll"
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

did you use the php5 installer? or the zip?

You should use the zip.
youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

Post by youngblood »

ohh i think i used the installer let me try that thanks for all your help!
youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

Post by youngblood »

Man I stink at this. Ok installed the zip (basically just unzipped to PHP folder since there is not setup.exe) Now when i try the page with the php in it is just shows a directory structure and the index.php has a "?" icon by it so i assume it still doesn't recognize the php.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you must change the DocumentIndex property in Apache's config to get index.php as an index page. ;)
youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

Post by youngblood »

ohhh :) umm how do i do that ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

oops, sorry DirectoryIndex

Code: Select all

DirectoryIndex portal.php index.php default.php index.html index.html.var
One I use locally.. The files are listed in order of precedence...
youngblood
Forum Newbie
Posts: 9
Joined: Thu Sep 01, 2005 9:24 am

Post by youngblood »

LOL now when i go to the page it gives me a save the file pop-up box. At least I am making progress. Whether it is forward or backwards is up to debate though.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If you have Firefox and the Web Developer extension, check the response headers. Your script may have caused the download to happen as well.
Post Reply