Page 1 of 2
PHP and Apache
Posted: Thu Sep 01, 2005 9:28 am
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!
Posted: Thu Sep 01, 2005 9:44 am
by feyd
Code: Select all
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Moved to
Web Servers.
Posted: Thu Sep 01, 2005 9:47 am
by youngblood
^^^^
Is that what I should add to the apache config?? Sorry a lil confused by your post.
Posted: Thu Sep 01, 2005 9:50 am
by feyd
to work with the modules, yes. Otherwise you have to use CGI mode, which is slow.
Posted: Thu Sep 01, 2005 10:11 am
by youngblood
Still doesn't seem to work
I am using Apache 1.3.3 and php 5 are they compatible?
Posted: Thu Sep 01, 2005 10:16 am
by feyd
have you tried following the direction here:
http://php.net/install.windows.apache1
Posted: Thu Sep 01, 2005 10:18 am
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"
Posted: Thu Sep 01, 2005 10:19 am
by feyd
did you use the php5 installer? or the zip?
You should use the zip.
Posted: Thu Sep 01, 2005 10:20 am
by youngblood
ohh i think i used the installer let me try that thanks for all your help!
Posted: Thu Sep 01, 2005 10:43 am
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.
Posted: Thu Sep 01, 2005 10:52 am
by feyd
you must change the DocumentIndex property in Apache's config to get index.php as an index page.

Posted: Thu Sep 01, 2005 10:52 am
by youngblood
ohhh

umm how do i do that ?
Posted: Thu Sep 01, 2005 11:09 am
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...
Posted: Thu Sep 01, 2005 11:27 am
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.
Posted: Thu Sep 01, 2005 11:31 am
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.