php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20515 argv array is empty
Submitted: 2002-11-20 06:23 UTC Modified: 2002-11-20 06:24 UTC
From: plant at virtualsolution dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.3 OS: Linux
Private report: No CVE-ID: None
 [2002-11-20 06:23 UTC] plant at virtualsolution dot net
In PHP 4.2.3 on Linux RedHat 7.3 when i try to pass some variable in this way:
php -q scrip.php first second

the otput don't echo me the first and second.
( don't register the variable in argv array)

On a binary on php 4.1.1 this work fine and work fine also on Windows version of php 4.2.3.

Enrico Plantulli

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-20 06:24 UTC] derick@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.
 [2002-11-20 06:40 UTC] plant at virtualsolution dot net
Yes derick .. but in my php.ini the register_globals is On !
register_argc_argv = On
register_globals = On

Have you the solution ? please?

Enrico Plantulli
 [2002-11-20 06:49 UTC] plant at virtualsolution dot net
I have find the solution:

foreach($_SERVER['argv'] as $k=>$v)
echo "$k -> $v \n";

0 -> argv.php 
1 -> pippo 
2 -> peppo

But i thik it isent documented
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 06:01:34 2024 UTC