From: php20050104 at webfreezer dot com Operating system: SuSE Linux 8.1 PHP version: 4.3.8 PHP Bug Type: PHP options/info functions Bug description: auto_append_file unable to see global variables
Description: ------------ Setting the following option in a .htaccess file appends the given file to any php file except it is terminated by exit: php_value auto_append_file append.php However although the manual states that this is just like a simple include() this is not true. An included file can see the global variables from the script it is included from. Using the auto_append_file option does not allow the appended script to see the global variables. Using a normal include() works of course so there is not a problem with the visibility of variables in included files in general. Reproduce code: --------------- apage.php: <?php $a="This should work!"; $GLOBALS["b"]="This should also work!"; echo "Script apage.php will finish now.<br>"; ?> append.php: <?php echo "And I say: ".$a."<br>"; echo "And also: ".$GLOBALS["b"]."<br>"; ?> Expected result: ---------------- Script apage.php will finish now.<br> And I say: This should work!<br> And also: This should also work!<br> Actual result: -------------- Script apage.php will finish now.<br> And I say: <br> And also: <br> -- Edit bug report at http://bugs.php.net/?id=31405&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31405&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31405&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31405&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31405&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31405&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31405&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31405&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31405&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31405&r=support Expected behavior: http://bugs.php.net/fix.php?id=31405&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31405&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31405&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31405&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31405&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31405&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31405&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31405&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31405&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31405&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31405&r=mysqlcfg
