Sessions don't work on command line and that is how you run your script
- from command line.
CF High wrote:
Hey Robert.
Indeed, hard to find the problem.
I don't believe it's a whitespace issue, or even a Headers sent issue,
despite the fact that I'm receiving that error.
Check it out:
H,
Well, is there a way to pass params to file_to_be_executed in command line?
For example:
?
$my_param = 'my_include_path';
$text = `usr/local/bin/php /path/to/my/php/page.php`;
?
Somehow I need $my_param to be passed to page.php (the file to be processed
in command line).
Any
Thank the heavens above
Actually, thank Ben, a poster from php.net manual.
Looks like environment variables are not passed to file when it is executed
from the command line.
A workaround is:
$inc_path = $_SERVER['DOCUMENT_ROOT'] . '/';
$remaddr = getenv(DOCUMENT_ROOT);
On Sun, 21 Sep 2003, CF High wrote:
Well, is there a way to pass params to file_to_be_executed in command line?
For example:
?
$my_param = 'my_include_path';
$text = `usr/local/bin/php /path/to/my/php/page.php`;
?
Somehow I need $my_param to be passed to page.php (the file to
Hi,
Monday, September 22, 2003, 2:13:57 AM, you wrote:
CH H,
CH Well, is there a way to pass params to file_to_be_executed in command line?
CH For example:
CH ?
CH $my_param = 'my_include_path';
CH $text = `usr/local/bin/php /path/to/my/php/page.php`;
?
CH Somehow I need $my_param
Finally!
Thanks Tom Rasmus for pointing me in the right direction.
God, two days of bleary eyed searching -- enough is enough. Thank you guys
for helping out a newbie.
--Noah
Tom Rogers [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
Monday, September 22, 2003, 2:13:57
Hey all.
I'm running a script from the command-line php interpreter as follows:
(thanks to D. Souza for lead)
$text = `usr/local/bin/php /path/to/my/php/page.php`;
within the read file I want to enable sessions, so I session_start() at the
top of the page:
?
session_start();
?
?
code to
On Sat, 2003-09-20 at 15:46, CF High wrote:
Hey all.
I'm running a script from the command-line php interpreter as follows:
(thanks to D. Souza for lead)
$text = `usr/local/bin/php /path/to/my/php/page.php`;
within the read file I want to enable sessions, so I session_start() at the
Hey Robert.
Indeed, hard to find the problem.
I don't believe it's a whitespace issue, or even a Headers sent issue,
despite the fact that I'm receiving that error.
Check it out:
test.php contains just one line: ?$text = `usr/local/bin/php
/path/to/my/php/test1.php`;?
test1.php, the file to
9 matches
Mail list logo