#43821 [NEW]: require_once is case sensitive

2008-01-11 Thread wxjasp02 at smumn dot edu
From: wxjasp02 at smumn dot edu
Operating system: Windows Server 2003
PHP version:  4.4.8
PHP Bug Type: Streams related
Bug description:  require_once is case sensitive

Description:

Require_Once in PHP 4.4.7 appears to be case sensitive in checking files
already included.

This has triggered 'cannot redeclare class' in situations where a
classfile may be already loaded, but require_once doesn't see it.

In light testing, I have found that I have to force my code to switch any
include or require calls to lower case to avoid this.

I realize this is an old version of php, and 4 is officially 'dead'; but I
am unaware if this has been fixed. (I wouldn't use 4, however the site
where we host refuses to move to PHP5 or update php4 to the latest.)

The bug was originally identified in Version 4.3.4, see: Bug# 26552;
however I believe it has re-surfaced.


System Configuration:
Windows Server 2003
Apache 2.0.59
PHP 4.4.7


Reproduce code:
---
Make a class and put it in a file which you will require_once.


In the file you will run, call:


Expected result:

The expected result is to only load myclass.php ONCE.


To confirm the problem, empty the file myclass.php, or put some non-class
junk in it.

After each require_once, add:   print_r(get_included_files());

You should see myclass.php the first time it is called,
and myclass.php, MyClass.php, the second.

Actual result:
--
Cannot Redeclare class MyClass in ... on line ...

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


#27471 [Fbk->Csd]: variables in a function or script alter session variables

2004-03-04 Thread wxjasp02 at smumn dot edu
 ID:   27471
 User updated by:  wxjasp02 at smumn dot edu
 Reported By:  wxjasp02 at smumn dot edu
-Status:   Feedback
+Status:   Closed
 Bug Type: Session related
 Operating System: RedHat Linux 9.0
 PHP Version:  Irrelevant
 New Comment:

realized PHP forces $_ variables to GLOBAL scope if --register-globals
is set to ON.


Previous Comments:


[2004-03-03 13:22:44] [EMAIL PROTECTED]

Keeping the status at "feedback" until then then.



[2004-03-03 13:01:14] wxjasp02 at smumn dot edu

i will post some sample code by midnight CST



[2004-03-03 12:59:04] wxjasp02 at smumn dot edu

http://www.mytoast.net/phpinfo.php



register_globals is ON.



[2004-03-03 04:44:47] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

Also fill in your PHP version number, which IS relevant and add a link
to your phpinfo(); output.



[2004-03-03 02:50:14] [EMAIL PROTECTED]

What is register_globals set to?



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/27471

-- 
Edit this bug report at http://bugs.php.net/?id=27471&edit=1


#27471 [Opn]: variables in a function or script alter session variables

2004-03-03 Thread wxjasp02 at smumn dot edu
 ID:   27471
 User updated by:  wxjasp02 at smumn dot edu
 Reported By:  wxjasp02 at smumn dot edu
 Status:   Open
 Bug Type: Session related
 Operating System: RedHat Linux 9.0
 PHP Version:  Irrelevant
 New Comment:

i will post some sample code by midnight CST


Previous Comments:


[2004-03-03 12:59:04] wxjasp02 at smumn dot edu

http://www.mytoast.net/phpinfo.php



register_globals is ON.



[2004-03-03 04:44:47] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

Also fill in your PHP version number, which IS relevant and add a link
to your phpinfo(); output.



[2004-03-03 02:50:14] [EMAIL PROTECTED]

What is register_globals set to?



[2004-03-02 20:30:32] wxjasp02 at smumn dot edu

i altered the URL to my bug, as it was kinda hard to properly see the
script as it is, the new one is:



http://www.mytoast.net/phpbug.txt



[2004-03-02 20:23:28] wxjasp02 at smumn dot edu

Description:

Whenever i use a variable declared $group or $username in a function or
part of a script, and $_SESSION['group'] or $_SESSION['username'] are
in a valid session, the $group or $username variables ALTER the
respective $_SESSION variable by the time the script ends.



This should NEVER occur.

Reproduce code:
---
http://www.mytoast.net/phpbug.html

Expected result:

It should complete all the if () statements safely, and execute them as
if I were of the correct group type.

Actual result:
--
Basically, a $_SESSION['group'] is written to a session when a user
logs in to my site. The form above, allows administrators of my site to
alter user permissions and whatnot, but it seems if $group is a
variable in the script, (and set), the $_SESSION['group'] gets altered
to whatever that value is, and the real administrator loses all their
admin privileges until they login again.



This is extremely annoying.

I found a workaround for the time being, but i don't like making more
code than i have to...





-- 
Edit this bug report at http://bugs.php.net/?id=27471&edit=1


#27471 [Fbk->Opn]: variables in a function or script alter session variables

2004-03-03 Thread wxjasp02 at smumn dot edu
 ID:   27471
 User updated by:  wxjasp02 at smumn dot edu
 Reported By:  wxjasp02 at smumn dot edu
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: RedHat Linux 9.0
 PHP Version:  Irrelevant
 New Comment:

http://www.mytoast.net/phpinfo.php



register_globals is ON.


Previous Comments:


[2004-03-03 04:44:47] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

Also fill in your PHP version number, which IS relevant and add a link
to your phpinfo(); output.



[2004-03-03 02:50:14] [EMAIL PROTECTED]

What is register_globals set to?



[2004-03-02 20:30:32] wxjasp02 at smumn dot edu

i altered the URL to my bug, as it was kinda hard to properly see the
script as it is, the new one is:



http://www.mytoast.net/phpbug.txt



[2004-03-02 20:23:28] wxjasp02 at smumn dot edu

Description:

Whenever i use a variable declared $group or $username in a function or
part of a script, and $_SESSION['group'] or $_SESSION['username'] are
in a valid session, the $group or $username variables ALTER the
respective $_SESSION variable by the time the script ends.



This should NEVER occur.

Reproduce code:
---
http://www.mytoast.net/phpbug.html

Expected result:

It should complete all the if () statements safely, and execute them as
if I were of the correct group type.

Actual result:
--
Basically, a $_SESSION['group'] is written to a session when a user
logs in to my site. The form above, allows administrators of my site to
alter user permissions and whatnot, but it seems if $group is a
variable in the script, (and set), the $_SESSION['group'] gets altered
to whatever that value is, and the real administrator loses all their
admin privileges until they login again.



This is extremely annoying.

I found a workaround for the time being, but i don't like making more
code than i have to...





-- 
Edit this bug report at http://bugs.php.net/?id=27471&edit=1


#27471 [Opn]: variables in a function or script alter session variables

2004-03-02 Thread wxjasp02 at smumn dot edu
 ID:   27471
 User updated by:  wxjasp02 at smumn dot edu
 Reported By:  wxjasp02 at smumn dot edu
 Status:   Open
 Bug Type: Session related
 Operating System: RedHat Linux 9.0
 PHP Version:  Irrelevant
 New Comment:

i altered the URL to my bug, as it was kinda hard to properly see the
script as it is, the new one is:



http://www.mytoast.net/phpbug.txt


Previous Comments:


[2004-03-02 20:23:28] wxjasp02 at smumn dot edu

Description:

Whenever i use a variable declared $group or $username in a function or
part of a script, and $_SESSION['group'] or $_SESSION['username'] are
in a valid session, the $group or $username variables ALTER the
respective $_SESSION variable by the time the script ends.



This should NEVER occur.

Reproduce code:
---
http://www.mytoast.net/phpbug.html

Expected result:

It should complete all the if () statements safely, and execute them as
if I were of the correct group type.

Actual result:
--
Basically, a $_SESSION['group'] is written to a session when a user
logs in to my site. The form above, allows administrators of my site to
alter user permissions and whatnot, but it seems if $group is a
variable in the script, (and set), the $_SESSION['group'] gets altered
to whatever that value is, and the real administrator loses all their
admin privileges until they login again.



This is extremely annoying.

I found a workaround for the time being, but i don't like making more
code than i have to...





-- 
Edit this bug report at http://bugs.php.net/?id=27471&edit=1


#27471 [NEW]: variables in a function or script alter session variables

2004-03-02 Thread wxjasp02 at smumn dot edu
From: wxjasp02 at smumn dot edu
Operating system: RedHat Linux 9.0
PHP version:  Irrelevant
PHP Bug Type: Session related
Bug description:  variables in a function or script alter session variables

Description:

Whenever i use a variable declared $group or $username in a function or
part of a script, and $_SESSION['group'] or $_SESSION['username'] are in a
valid session, the $group or $username variables ALTER the respective
$_SESSION variable by the time the script ends.



This should NEVER occur.

Reproduce code:
---
http://www.mytoast.net/phpbug.html

Expected result:

It should complete all the if () statements safely, and execute them as if
I were of the correct group type.

Actual result:
--
Basically, a $_SESSION['group'] is written to a session when a user logs
in to my site. The form above, allows administrators of my site to alter
user permissions and whatnot, but it seems if $group is a variable in the
script, (and set), the $_SESSION['group'] gets altered to whatever that
value is, and the real administrator loses all their admin privileges
until they login again.



This is extremely annoying.

I found a workaround for the time being, but i don't like making more code
than i have to...

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