Re: Verry strange GET behaviour
| From: | John Wilcox | Date: | Tue, 07 Oct 2003 16:53:13 +0000 |
| Subject: | Re: Verry strange GET behaviour | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165327@lists.php.net to get a copy of this message | ||
--- Chris Shiflett <shiflett@php.net> wrote:
> --- John Wilcox <random50k@yahoo.com> wrote:
> > On the topic of passing args, can someone please
> explain to me why
> > I'm unable to use $_GET or $_POST if my php script
> is run as a .cgi?
> What you may want to do is to have the Web server
> interpret .cgi files as PHP,
> assuming all your CGIs are PHP scripts. Then you can
> leave out your #! line at
> the top also.
The reason why I'm having my php run as a .cgi in the
first place, is because I want the script to inherit
the user/group of the virtual host that it's running
under (using suEXEC), and this is not possible when
using a php script interpreted through the web server.
It must be run as a .cgi, since .cgi's will inherit
the user/group. This is no problem in Perl, since it
provides a way to pass variables from one .cgi to
another (using my $query = new CGI;
param('testbox');). But I can't figure out how to do
this in PHP, since using $_GET['testbox']; always
produces "Undefined index: testbox in test.cgi on line
8".. Thanks,
John
P.S. If anyone has any other ideas of how to get a PHP
script to run as a specific user/group under a Virtual
Host, I'm all ears.. All I need is for the script to
be able to mkdir as a specific user/group, but this is
proving to be more than a small challenge!
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com