Forum Moderators: coopster
LoadModule php4_module modules/libphp4.so
and then restart apache, I get an error:
[warn] module php4_module is already loaded, skipping
If I do not include this line in the httpd.conf file, php still works correctly.
I have a website which all URL are in this format
mysite/index.php/title
When I try to remove the extension, I create this .htaccess file and rename the original index.php to index:
<Files index>
AcceptPathInfo on
SetOutputFilter PHP
SetInputFilter PHP
</Files>
But it does not work. All php file (here the index) are parsed as text file, not executed ( I have set it to 755)
However,after following the instruction from the vendor, it works. The vendor says:
"If your Host/server runs PHP as a CGI process (as opposed to a web server module) you may need to use this code:
<Files index>
SetHandler application/x-httpd-php
</Files>"
I am confused. How to tell if my php is running as CGI or module? How to set it to run as module?
Thanks
How to tell if my php is running as CGI or module?
Create and run this script...
<?php
print php_sapi_name() [php.net];
?>
php_sapi_name() [php.net] returns a lowercase string which describes the type of interface between web server and PHP (Server API, SAPI). In CGI PHP, this string is "cgi", in mod_php for Apache, this string is "apache" and so on.