From:             gk at proliberty dot com
Operating system: RH 9 Linux
PHP version:      5.0.3
PHP Bug Type:     CGI related
Bug description:  auto_prepend_file not respected in command line environment

Description:
------------
auto_prepend_file, auto_append_file values are not effective in command
line (CLI-SAPI) code: php -r <code>

The value of auto_prepend_file is correctly reported as having been read
from the php.ini file (or equivalent -d command line assignment), but the
file is not 'prepended' prior to execution of command line code.

If this is by design, then this behavior is inconsistent with how other
php.ini values are respected in the command line code environment and
should be documented since it is not intuitive.

Please do not bogusify this report.
If not a design bug, then this is a documentation bug and a feature
request.

Reproduce code:
---------------
cat /auto_prepend_file.php
<?php echo __FILE__."\n"; ?>

php -d auto_prepend_file=/auto_prepend_file.php -r 'echo "code";';

Expected result:
----------------
auto_prepend_file.php
code

Actual result:
--------------
code

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

Reply via email to