#18657 [NEW]: CLI version: scriptname is only available through argv

From: Date: Tue, 30 Jul 2002 19:59:23 +0000
Subject: #18657 [NEW]: CLI version: scriptname is only available through argv
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15620@lists.php.net to get a copy of this message
From: cmv@php.net Operating system: Linux 2.4 PHP version: 4.2.2 PHP Bug Type: Feature/Change Request Bug description: CLI version: scriptname is only available through argv With the CLI version, the only way to access the script name is through: $_SERVER['argv'][0] In 4.2.2, $_SERVER['PHP_SELF'] is set, but empty. In 4.3.0-dev, it's not even set. I don't know which of $_SERVER['SCRIPT_NAME'] or $_SERVER['PHP_SELF'] would be more appropriate, but I think setting either of those to the script name would be more intuitive, and might make porting web-based scripts to CLI-based scripts easier. - Colin -- Edit bug report at http://bugs.php.net/?id=18657&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18657&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18657&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18657&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18657&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18657&r=support Expected behavior: http://bugs.php.net/fix.php?id=18657&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18657&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18657&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18657&r=globals

« previous php.bugs (#15620) next »