Running PHP as a Module

Running PHP as a Module

Posted by: abosio
Posted on: 2006-08-05 07:57:00

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.



Re: Running PHP as a Module

Posted by: Atropos7
Posted on: 2006-08-05 10:37:00


See

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

Note that it is unsupported.

cool Atropos | openvein.orgEdited by Atropos7 on 08/05/06 10:42 AM (server time).

Re: Running PHP as a Module

Posted by: abosio
Posted on: 2006-08-05 11:25:00

Thanks

Re: Running PHP as a Module

Posted by: abosio
Posted on: 2006-08-06 21:00:00

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?

Re: Running PHP as a Module

Posted by: Atropos7
Posted on: 2006-08-06 21:30:00

Nope

cool Atropos | openvein.org

Re: Running PHP as a Module

Posted by: abosio
Posted on: 2006-08-07 21:12:00

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.


Tags: php 4runningdreamhostapache modulewikihttpcgiindex