Running PHP as a Module

software development

#1

The wiki currently states that running PHP 4 as an Apache module is an option. How do I switch to that?

http://wiki.dreamhost.com/index.php/PHP#PHP_on_DreamHost

I am not pleased with the trade-offs of running as CGI.


#2

See

ow do I switch my PHP between running as a CGI and an Apache module?

Note that it is unsupported.

:cool: [color=#6600CC]Atropos[/color] | openvein.org


#3

Thanks


#4

When I use the .htaccess AddHandler method to switch to an Apache module, it switches from PHP 5 to PHP 4. There’s no way to keep it on v5?


#5

Nope

:cool: [color=#6600CC]Atropos[/color] | openvein.org


#6

Ok, since I don’t have any choice, I think I have my dev server (my desktop) running as CGI now - because I want them to match - but it doesn’t parse my php files. I added the following to my virtual host in the apache config:

AddType application/x-httpd-php-cgi .php
Action application/x-httpd-php-cgi /usr/bin/php

And commented out the Loadmodule and Addmodule lines.

But it only gives this 404 error:
“The requested URL /usr/bin/php/phpinfo.php was not found on this server.”

For some reason it is appending the requested file /phpinfo.php to the path given for the action.