For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > July 2007 > Re: [PHP-INSTALL] php(5)-cgi + Apache2 + fastcgiexternalserver =









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] php(5)-cgi + Apache2 + fastcgiexternalserver =
Keith Roberts

2007-07-24, 7:01 pm

Tony Shadwick

2007-07-24, 7:01 pm

Not quite. You can't run the apache module. I think you're mistaking me...

On box A we have:

Apache2 + mod_fastcgi

on box B we have

PHP5 built as a CGI module (I have a CLI binary available too, but can
delete it for testing purposes).

On box B, I start the php repsonder by doing this:

/usr/local/bin/php-cgi -b 9000

From box A, I can telnet to box B on port 9000, and it answers.

Back on Box A, I have the config at the bottom of this message, where
I've defined in httpd.conf fastcgiexternalserver:

FastCGIExternalServer /path/to/stub/fcgi-bin/php -host (IP of box B):9000


Then in my virtual host I've placed this:

AddHandler php-cgi .php
Action php-cgi /fcgi-bin/php
ScriptAlias /fcgi-bin/php /path/to/stub/fcgi-bin/php

After restarting apache, I can then attempt to execute phpinfo.php which
is in my site's document root. I get no input file specified, and in
the logs, it says that the remote php is returning a 404. Also included
is the strings output of what I capture from tcpdump.


(Just realizing I'm becoming a broken record here...) :)


Keith Roberts wrote:
> That's interesting Tony. Didn't know you could do that. Are you saying
> you want to run PHP as an apache module, and the CLI version remotely?
>
> If so, why would you want to do that?
>
> Regards
>
> Keith
>
> On Tue, 24 Jul 2007, Tony Shadwick wrote:
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com