nntp.php & register_argc_argv off [message #6125] |
Wed, 02 October 2002 17:00 |
valiant
Messages: 80 Registered: September 2002 Location: Zurich
Karma: 0
|
Member |
|
|
Hi
I'm trying to run nntp.php in the shell.
As I'm not the httpd user I copied the file to nntp_1.php which is chmoded 777.
I execute it with:
./nntp_1.php 2
I get fallowing error:
PHP Notice: Undefined index: argc in /home/andress/fudforum/scripts/nntp_1.php on line 22
<br />
<b>Notice</b>: Undefined index: argc in <b>/home/andress/fudforum/scripts/nntp_1.php</b> on line <b>22</b></br />
Missing Forum ID Paramater
register_globals is on
register_argc_argv is off
PHP 4.22
I've traced the error and it's the first if statement:
if( $HTTP_SERVER_VARS['argc'] < 2 ) exit("Missing Forum ID Paramater\n");
I changed it to:
if( $_SERVER['argc'] < 2 ) exit("Missing Forum ID Paramater\n");
But that didn't help.
I've tested if there's anything in argv[0], but it's empty.
Could you help me please?
Thanks - Andy
|
|
|
|
|
|
|
|
Re: nntp.php & register_argc_argv off [message #6165 is a reply to message #6163] |
Fri, 04 October 2002 13:58 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Really? now that's unusual register_argv_argc is something that you can set via ini_set(), which is exactly what the script does.
FUDforum Core Developer
|
|
|
|
|
|
|
|
Re: nntp.php & register_argc_argv off [message #6196 is a reply to message #6193] |
Sat, 05 October 2002 15:38 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You are showing me the version of your webservers's PHP, the binary is different and quite possibly a different version.
To get the binaries version do:
php -v
FUDforum Core Developer
|
|
|
|
Re: nntp.php & register_argc_argv off [message #6255 is a reply to message #6208] |
Sun, 06 October 2002 22:50 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Seems like a possible php bug to me. The -w option should've turned them on, the fact it didn't implies some sort of a problem with PHP.
FUDforum Core Developer
|
|
|
|
|
|
|
|
|