php enabling
Hi,
I am not using linux at this time or hve been for a while. I am just in the process of learning php for a job. Refer to your readme file to see what lines you need to add to your httpd.conf file. I am using it on windows with php. Im guessing it would be similiar. Maybe the auto confg isnt pointing to your php.dll or cgi in the right location. Its 2 or 3 lines you must add correctly or it wont work.
eg for cgi install:
Installing as a CGI binary
You need to insert these three lines to your Apache httpd.conf
configuration file to set up the CGI binary:
Example 2-5. PHP and Apache 2.0 as CGI
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
# For PHP 4
Action application/x-httpd-php "/php/php.exe"
# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"
or
Installing as an Apache module
You need to insert these two lines to your Apache httpd.conf
configuration file to set up the PHP module for Apache 2.0:
Example 2-6. PHP and Apache 2.0 as Module
# 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"
Note: Remember to substitute the c:/php/ for your actual path to
PHP in the above examples. Take care to use either php4apache2.dll
or php5apache2.dll in your LoadModule directive and not
php4apache.dll or php5apache.dll as the latter ones are designed to
run with Apache 1.3.x.
Note: If you want to use content negotiation, read related FAQ.
But that is only my versions of Apache and php being Apache 2, most are a little different, you need to look up installing on linux
|