setting $_SERVER variables from a shell script

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Using php 4.4.4 on Fedora Core 5 Linux.  I'm running a PHP program via
a command line script rather than accessing the page through my web
server.  I was wondering if it's possible to set the
$_SERVER['DOCUMENT_ROOT'] variable from my shell script so that when I
run my PHP file

/usr/local/bin/php4.cli myfile.php

the variable will be recognized as opposed to returning nothing.

Thanks for any advice, - Dave

Re: setting $_SERVER variables from a shell script

Quoted text here. Click to load it

I don't quite follow... $_SERVER['DOCUMENT_ROOT'] is only there for you to  
retreive a value; you can't set it.  Well you can, but only via php.ini  
What are you trying to do with that value?

Site Timeline