#44673 [NEW]: argv/argc starts from arguments, not from script

From: Date: Tue, 08 Apr 2008 21:10:08 +0000
Subject: #44673 [NEW]: argv/argc starts from arguments, not from script
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-124093@lists.php.net to get a copy of this message
From:             jc at chenailler dot com
Operating system: gentoo
PHP version:      5.2.6RC4
PHP Bug Type:     Unknown/Other Function
Bug description:  argv/argc starts from arguments, not from script

Description:
------------
Hy,

With PHP-5.2.6RC4 i have this probleme when using in command line :

usage :
php -q test.php a b c d

with php <= 5.2.5 this probleme didn't exists.

configure for both versions :
'./configure' '--with-fastcgi=/usr/local' '--enable-simplexml'
'--enable-fastcgi' '--enable-force-cgi-redirect'
'--prefix=/usr/local/php5'
'--disable-cli' '--with-filepro' '--with-mysql=/usr'
'--with-xml'
'--disable-exif' '--enable-ftp' '--enable-bcmath'
'--enable-calendar'
'--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir'
'--with-gettext'
'--with-zlib-dir' '--enable-trans-sid' '--with-kerberos'
'--with-openssl'
'--enable-sysvsem' '--enable-sysvshm' '--with-gettext'
'--with-dom'
'--with-mcrypt' '--with-iconv' '--enable-mbstring=all'
'--enable-mbregex'
'--with-png-dir=/usr' '--with-jpeg-dir=/usr'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-config-file-scan-dir=/etc/php.d' '--disable-pdo'
'--without-sqlite'
'--enable-inline-optimization'


Reproduce code:
---------------
<?php
echo "PHP_VERSION=".PHP_VERSION."\n";
echo "argc=$argc\nargv=";
print_r($argv);
?>


Expected result:
----------------
PHP_VERSION=5.2.5
argc=5
argv=Array
(
    [0] => test.php
    [1] => a
    [2] => b
    [3] => c
    [4] => d
)


Actual result:
--------------
PHP_VERSION=5.2.6RC4
argc=4
argv=Array
(
    [0] => a
    [1] => b
    [2] => c
    [3] => d
)


-- 
Edit bug report at http://bugs.php.net/?id=44673&edit=1
-- 
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44673&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44673&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44673&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44673&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=44673&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44673&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44673&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44673&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44673&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44673&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=44673&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=44673&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44673&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44673&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44673&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44673&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44673&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44673&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44673&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44673&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#124093) next »