#33392 [NEW]: unable to override SCRIPT_FILENAME for input source
From: php dot 5 dot magnum3065 at spamgourmet dot com
Operating system: Debian GNU/Linux
PHP version: 5.0.4
PHP Bug Type: CGI related
Bug description: unable to override SCRIPT_FILENAME for input source
Description:
------------
When the SCRIPT_FILENAME environment variable is set this is given
precedence over all other ways of providing the input source.
I am trying to use the PHP executable to provide syntax highlighting of
PHP source within a web application (not PHP-based). However since the
PHP executable is called from within the CGI application, the
SCRIPT_FILENAME variable is set to the CGI file. So, rather than
highlighting the content I've tried passing through stdin, as well as a
filename parameter to the executable, PHP processes the CGI file.
This filename provided as a command line parameter should be given
precedence, and if "-" is given as the filename, the content should be
processed from stdin.
Reproduce code:
---------------
From a bash command line:
$ echo "Content I want highlighted" > process_me.txt
$ echo "This gets output instead" > not_me.txt
$ export SCRIPT_FILENAME=not_me.txt/
$ php -qs process_me.txt
Expected result:
----------------
<code><span style="color: #000000">
Content I want highlighted<br /></span>
Actual result:
--------------
<code><span style="color: #000000">
This gets output instead<br /></span>
--
Edit bug report at http://bugs.php.net/?id=33392&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33392&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33392&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33392&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33392&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33392&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33392&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33392&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33392&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33392&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33392&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33392&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33392&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33392&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33392&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33392&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33392&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33392&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33392&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33392&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33392&r=mysqlcfg
Thread (7 messages)
- php dot 5 dot magnum3065 at spamgourmet dot com