Quote:
quote:
Should I be adding the lines below to httpd-win.conf, and this only?.
|
There should be a file simply titled httpd.conf.. perhaps this is something new since I last downloaded Apache.
If Apache is installed to 'C' then this is where it should be found:
C:\Apache Group\Apache2\conf\httpd.conf
If the 'httpd-win.conf' is the only file resembling this in the directory, rename it to httpd.conf and make the modifications.
Apache has to be restarted after every modification to the configuration file.
If you get an error stating something to the effect of 'requested operation has failed' then you'll know something went wrong.
If you modify the php.ini file and PHP is configurated as an Apache module, Apache has to also be restarted after every modification to that configuration file as well.
Test your PHP install by running the following script...
(Save as test.php or phpinfo.php)
<?php
phpinfo();
?>
This outputs a detailed table of PHP configuration settings.
Apache's default serving directory is 'htdocs'... so this is where you need to save your web-accessible files. I changed mine cause I didn't think that very efficient, you can modify that by finding the DocumentRoot line and appending the file path like this:
DocumentRoot "F:/www"
Now webpages are served from the F:\www directory.
If you want to use an index.php file instead of an index.html file for the default loading page modify this line:
DirectoryIndex index.php index.html index.html.var
You can also tell the PHP interpretter to parse .html files (or whatever other extension) by adding this:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
I would suggest installing PHP as an Apache Module, instead of as a CGI.. the difference means a huge boost in preformance. Since the php.ini file doesn't have to opened every time a script is executed. And its also more secure. This is also discussed on the manual page I mentioned:
Example 3-8. PHP and Apache 2.0 as Module
; For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
; For PHP 5 do something like this:
LoadModule php5_module "c:/php/sapi/php5apache2.dll"
AddType application/x-httpd-php .php
BTW: locate the php4apache2.dll file to be sure the file path is correct (I don't think PHP 5 stores this in a sub-directory, if it is PHP 5 you're installing).
PHP installed as an Apache module also requires dropping a .dll in the system32 directory:
move php4ts.dll for PHP 4, or php5ts.dll for PHP 5 to the C:\Windows\system32\ directory.
These .dll files are in the .zip download of PHP.
All that make sense?
hth,
: )
Rich
::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::