httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <>
Subject Re: [users@httpd] How to run php with virtual host based uid/gid on apache2 ?
Date Fri, 27 Aug 2004 11:35:07 GMT
Stephan von Krawczynski wrote:
> > I did a quick test (with Apache 2), like this:
> > - I put a copy of the php binary in a web root.
> > - Had the above AddType and Action, but with "/php" as second
> >   parameter.
> I tried that again under 1.3.28 but no good. It still tries to find a
> file "/php/test.php" which is wrong.

Hmm... I don't know if this might be a 1.3 vs. 2.0 issue, or just a config
issue. I haven't played much with Action, so I don't really why this
happens. Could you perhaps post the *exact* configuration you tried?

Unless I'm wrong, what should happen is that a request to eg "/page.php"
gets internally redirected to something like "/php?page.php" (simplified).
The CGI "/php" is then executed with "page.php" as argument.

> How can apache see from above config that it should use my CGI-wrapper
> suexec for the above case, that ".php" should be treated just like ".cgi"
(as an
> example) only with using "/usr/bin/php" as interpreter?

I'm actually not 100% certain, but when doing this, "/usr/bin/php" is not
the interpreter, but the CGI program itself. Thus it should be executed as
any other CGI, in this case, through SuExec.

I had no idea running PHP as CGI would be so complicated! ;-)

Robert Andersson

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message