ID:               44673
 Updated by:       [EMAIL PROTECTED]
-Summary:          argv/argc starts from arguments, not from script
 Reported By:      jc at chenailler dot com
 Status:           Open
 Bug Type:         CGI related
 Operating System: gentoo
 PHP Version:      5.2.6RC4
 New Comment:

Note: This only happens with CGI binary. CLI is fine.


Previous Comments:
------------------------------------------------------------------------

[2008-04-08 21:10:07] jc at chenailler dot com

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 this bug report at http://bugs.php.net/?id=44673&edit=1

Reply via email to