How to make the PHP know the real SCRIPT_FILENAME?
am 17.11.2009 01:38:31 von Dong Wang
--000feaedef9f70e38304788658cb
Content-Type: text/plain; charset=ISO-8859-1
I am trying to use PHP as backend, which communicate with apache-2.3's
mod_proxy_fcgi
But I have noticed that the SCRIPT_FILENAME has been changed to
"proxy:balancer://xxxxxx", it cann't be recognized by the remote PHP
backend. So the request failed.
In my opinion, the remote PHP backend use the SCRIPT_FILENAME to find the
script file. But the PHP and the Apache may be in different computer, so the
Document Root may be different. is that means the PHP shouldn't rely on the
SCRIPT_FILENAME?
how can I configure the PHP to know the real script file to execute?
Thank you
--000feaedef9f70e38304788658cb--
Re: How to make the PHP know the real SCRIPT_FILENAME?
am 17.11.2009 14:19:14 von Nathan Rixham
Dong Wang wrote:
> I am trying to use PHP as backend, which communicate with apache-2.3's
> mod_proxy_fcgi
>
> But I have noticed that the SCRIPT_FILENAME has been changed to
> "proxy:balancer://xxxxxx", it cann't be recognized by the remote PHP
> backend. So the request failed.
> In my opinion, the remote PHP backend use the SCRIPT_FILENAME to find the
> script file. But the PHP and the Apache may be in different computer, so the
> Document Root may be different. is that means the PHP shouldn't rely on the
> SCRIPT_FILENAME?
>
> how can I configure the PHP to know the real script file to execute?
>
> Thank you
>
$real_script_file = __FILE__;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: How to make the PHP know the real SCRIPT_FILENAME?
am 17.11.2009 15:44:43 von Dong Wang
--001485ed54a3a7ec400478922ac6
Content-Type: text/plain; charset=ISO-8859-1
ur... you mean use this in the php script?
but the php-cgi still doesn't know which scriptfile to execute, isn't it?
php-cgi tries to find the aimed script using SCRIPT_FILENAME, but this
variable is changed by the mod_proxy_fcgi, so php-cgi can not find the real
scriptfile, that's the point, I think.
Or maybe there is something I misunderstand?
On Tue, Nov 17, 2009 at 9:19 PM, Nathan Rixham wrote:
> Dong Wang wrote:
> > I am trying to use PHP as backend, which communicate with apache-2.3's
> > mod_proxy_fcgi
> >
> > But I have noticed that the SCRIPT_FILENAME has been changed to
> > "proxy:balancer://xxxxxx", it cann't be recognized by the remote PHP
> > backend. So the request failed.
> > In my opinion, the remote PHP backend use the SCRIPT_FILENAME to find the
> > script file. But the PHP and the Apache may be in different computer, so
> the
> > Document Root may be different. is that means the PHP shouldn't rely on
> the
> > SCRIPT_FILENAME?
> >
> > how can I configure the PHP to know the real script file to execute?
> >
> > Thank you
> >
>
>
> $real_script_file = __FILE__;
>
--001485ed54a3a7ec400478922ac6--