ID:               31405
 Updated by:       [email protected]
 Reported By:      php20050104 at webfreezer dot com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         PHP options/info functions
 Operating System: SuSE Linux 8.1
 PHP Version:      4.3.8
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


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

[2005-01-05 10:35:31] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2005-01-04 12:22:49] php20050104 at webfreezer dot com

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

Reply via email to