Re: [PHP] $ENV['SCRIPT_FILENAME']

2006-05-15 Thread John Wells
On 5/14/06, Ryan A <[EMAIL PROTECTED]> wrote: Anyone have an idea of a variable (eg: $_SERVER['REQUEST_METHOD'] ) that will be set only if called via the web and ignored if called via cli? I have no experience with CLI, and haven't tested this, but I believe that any time a request comes throug

Re: [PHP] $ENV['SCRIPT_FILENAME']

2006-05-14 Thread Richard Lynch
Way back in Olden Times (PHP 3.0) $_ENV used to be called $ENV, back when $_POST was $HTTP_POST_VARS and similarly for GET and such-like. You've got some old code relying on the deprecated syntax. You can either hack your php.ini to support old-school var names, or you can change all $ENV to $_EN

Re: [PHP] $ENV['SCRIPT_FILENAME']

2006-05-14 Thread Ryan A
Hey guys, Thanks for replying. I have figured out what he is trying to do basically he wants to know if the script is being called via the web or via CLI... if called via the web he wants to display the welcomeScreen() if not he wants to do other stuff... Problem is, that ENV thing is wrong s

Re: [PHP] $ENV['SCRIPT_FILENAME']

2006-05-14 Thread Rory Browne
Unless there is an other piece of code filling up the $ENV array - possibly a cleaning routine. On 5/14/06, Rory Browne <[EMAIL PROTECTED]> wrote: Sorry - what's your question? I think that $ENV should be $_ENV, which in turn should be $_SERVER. On 5/14/06, Ryan A < [EMAIL PROTECTED]> wrote:

Re: [PHP] $ENV['SCRIPT_FILENAME']

2006-05-14 Thread Rory Browne
Sorry - what's your question? I think that $ENV should be $_ENV, which in turn should be $_SERVER. On 5/14/06, Ryan A <[EMAIL PROTECTED]> wrote: Hi, I am going through another persons script (which is not working) and have come accross this: if (isset($ENV['SCRIPT_FILENAME'])) { $CLIENT

Re: [PHP] $ENV['SCRIPT_FILENAME']

2006-05-14 Thread tedd
At 11:59 AM -0700 5/14/06, Ryan A wrote: Hi, I am going through another persons script (which is not working) and have come accross this: if (isset($ENV['SCRIPT_FILENAME'])) { $CLIENT_PATH= dirname($ENV['SCRIPT_FILENAME']); WelcomeScreen(); TestSetup($TH_HASH); exit; } I

[PHP] $ENV['SCRIPT_FILENAME']

2006-05-14 Thread Ryan A
Hi, I am going through another persons script (which is not working) and have come accross this: if (isset($ENV['SCRIPT_FILENAME'])) { $CLIENT_PATH= dirname($ENV['SCRIPT_FILENAME']); WelcomeScreen(); TestSetup($TH_HASH); exit; } I am just starting on CLI stuff but I cant f