Bug #14295 Updated: Scope of globals has changed
| From: | v dot puttrich at digitalliquid dot de | Date: | Thu, 06 Dec 2001 13:40:49 +0000 |
| Subject: | Bug #14295 Updated: Scope of globals has changed | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72747@lists.php.net to get a copy of this message | ||
ID: 14295
User updated by: v.puttrich@digitalliquid.de
Reported By: v.puttrich@digitalliquid.de
Status: Open
Bug Type: Variables related
Operating System: Win2k
PHP Version: 4.0.6
Old Assigned To: zak
Assigned To:
New Comment:
zak:
I have set up a webserver and ftp for you to do the tests you need. The account is running on the
system which produces the problem. Feel free to use it as you like.
NOTE:
The server might be offline for a short while sometimes. This is because of redialing and submitting
a new IP to DynDNS.org every 24 hours.
Additionally the server will be down on Sunday, 12/9/01 00:00:00 Am to 10:00:00 Am european time.
If you should have additional questions or wishes related to the account do not hesitate to ask me.
HTTP and FTP: phpnet.homeip.net
The password for the FTP will reach you by email.
Previous Comments:
------------------------------------------------------------------------
[2001-12-06 07:41:47] zak@php.net
Thanks for trying the scripts! If we are lucky, this bug
report will help us find what weird thing makes $PHP_SELF
behave strangely under Win32.
Could you please try the same test with a different global
value?
------------------------------------------------------------------------
[2001-12-05 01:49:07] v.puttrich@digitalliquid.de
Zak: I did try it and could reproduce with your code.
I found out, that it only happens when i'm running my scripts on Win2k. On Linux my scripts are
running as expected and I don't need to declare $PHP_SELF global again.
The only difference in my PHP configuration is:
On Win2k virtual dirs is enabled, on Linux it's disabled.
Well, I don't know where to set virtual directory support on/off, so I can't verify.
------------------------------------------------------------------------
[2001-12-04 19:34:58] sniper@php.net
I can not reproduce this with PHP 4.1.0RC5 either.
------------------------------------------------------------------------
[2001-12-02 01:52:04] zak@php.net
Cannot reproduce under PHP 4.1.0 w/ Linux
Please try the code below. Save the files under the names
indicated in the comments and try running test.php:
# test.php
<?php include 'test.inc'; echo "Main File: $PHP_SELF" ?>
# test.inc
<?php echo "Included File: $PHP_SELF" ?>
------------------------------------------------------------------------
[2001-11-30 15:07:54] v.puttrich@digitalliquid.de
EXAMPLE:
// Main script
// The global variables are available in this script
include("form.inc.php");
...
// End main script
----
// File: form.inc.php
// The global variables from the main script are not available here
<form action="<?php echo $PHP_SELF; ?>" method="post">
[form]
</form>
// End file: form.inc.php
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14295
Edit this bug report at http://bugs.php.net/?id=14295&edit=1