#47565 [NEW]: Extend serialize and unserialize with encryption key.

2009-03-04 Thread martin at itmission dot com
From: martin at itmission dot com
Operating system: 
PHP version:  5.3.0beta1
PHP Bug Type: Feature/Change Request
Bug description:  Extend serialize and unserialize with encryption key.

Description:

Request: Add simple encryption support to serialize and unserialize.

Rationale: It is useful to be able to serialize an object and hide it in a
form variable on a web page.  This is vulnerable to tampering by the end
user.

serialize(mixed $value[, string $key])
unserialize(string $str[, string $key])

This new definition won't break existing code and could be implemented
using a TEA variant in a few lines.  It would be nice if objects didn't
have to be persisted in $_SESSION, because some power users want to use
multiple windows to work with different objects simultaneously (editing two
invoice objects at the same time, but commiting only complete changes of
each).


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



#47388 [Opn]: Array Foreach Reference Broken

2009-02-16 Thread martin at itmission dot com
 ID:   47388
 User updated by:  martin at itmission dot com
 Reported By:  martin at itmission dot com
 Status:   Open
-Bug Type: Feature/Change Request
+Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.3.0beta1
 New Comment:

Changed category


Previous Comments:


[2009-02-14 19:47:28] martin at itmission dot com

Description:

When using foreach on an array using the reference syntax, stuff breaks
later.

Reproduce code:
---
?php

$a = array(0, 1, 2, 3, 4);

foreach($a as $k = $v)
{
$v++;
}

foreach($a as $k = $v)
{
echo($k = $v\n);
}

?

Expected result:

0 = 1
1 = 2
2 = 3
3 = 4
4 = 5

Actual result:
--
0 = 1
1 = 2
2 = 3
3 = 4
4 = 4





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



#47388 [Com]: Array Foreach Reference Broken

2009-02-16 Thread martin at itmission dot com
 ID:   47388
 Comment by:   martin at itmission dot com
 Reported By:  martin at itmission dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.3.0beta1
 New Comment:

Also happens in 5.2.8


Previous Comments:


[2009-02-16 18:56:12] martin at itmission dot com

Changed category



[2009-02-14 19:47:28] martin at itmission dot com

Description:

When using foreach on an array using the reference syntax, stuff breaks
later.

Reproduce code:
---
?php

$a = array(0, 1, 2, 3, 4);

foreach($a as $k = $v)
{
$v++;
}

foreach($a as $k = $v)
{
echo($k = $v\n);
}

?

Expected result:

0 = 1
1 = 2
2 = 3
3 = 4
4 = 5

Actual result:
--
0 = 1
1 = 2
2 = 3
3 = 4
4 = 4





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



#47388 [Bgs]: Array Foreach Reference Broken

2009-02-16 Thread martin at itmission dot com
 ID:   47388
 User updated by:  martin at itmission dot com
 Reported By:  martin at itmission dot com
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.3.0beta1
 New Comment:

The error is in my code.  Sorry.  Always unset variables after a
foreach with a reference unless you know what you are doing.

unset($v);


Previous Comments:


[2009-02-16 19:15:58] der...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.



[2009-02-16 18:57:13] martin at itmission dot com

Also happens in 5.2.8



[2009-02-16 18:56:12] martin at itmission dot com

Changed category



[2009-02-14 19:47:28] martin at itmission dot com

Description:

When using foreach on an array using the reference syntax, stuff breaks
later.

Reproduce code:
---
?php

$a = array(0, 1, 2, 3, 4);

foreach($a as $k = $v)
{
$v++;
}

foreach($a as $k = $v)
{
echo($k = $v\n);
}

?

Expected result:

0 = 1
1 = 2
2 = 3
3 = 4
4 = 5

Actual result:
--
0 = 1
1 = 2
2 = 3
3 = 4
4 = 4





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



#47388 [NEW]: Array Foreach Reference Broken

2009-02-14 Thread martin at itmission dot com
From: martin at itmission dot com
Operating system: Windows XP
PHP version:  5.3.0beta1
PHP Bug Type: Feature/Change Request
Bug description:  Array Foreach Reference Broken

Description:

When using foreach on an array using the reference syntax, stuff breaks
later.

Reproduce code:
---
?php

$a = array(0, 1, 2, 3, 4);

foreach($a as $k = $v)
{
$v++;
}

foreach($a as $k = $v)
{
echo($k = $v\n);
}

?

Expected result:

0 = 1
1 = 2
2 = 3
3 = 4
4 = 5

Actual result:
--
0 = 1
1 = 2
2 = 3
3 = 4
4 = 4

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



#41192 [Fbk-Opn]: Per Directory Values only work for one key

2007-04-26 Thread martin at itmission dot com
 ID:   41192
 User updated by:  martin at itmission dot com
 Reported By:  martin at itmission dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows Server 2003
 PHP Version:  5.2.1
 Assigned To:  dmitry
 New Comment:

I downloaded the newest Win32 Snapshot from snaps.php.net:

php5.2 (zip) (9.5M)
Built On: Apr 26, 2007 08:30 GMT

In this version of PHP (5.2.2RC2-dev), Per Directory Values do not work
at all.  My phpinfo page shows display errors: off for both sites.

When I roll back to PHP-5.2.1, it works for the first website in the
registry, and with PHP-5.2.0, it works for both of them.


Previous Comments:


[2007-04-26 11:05:39] [EMAIL PROTECTED]

The bug should be already fixed. Could you check snapshot from
http://snaps.php.net



[2007-04-26 03:09:02] martin at itmission dot com

I am assuming that it has something to do with the massive change to
registry.c between 5.2.0 and 5.2.1 changelogged as implemented registry
cache that prevent registry lookup on each request. In case of
modification of corresponding registry-tree PHP will reload it
automatic.

Perhaps something in the way it's being cached is not working properly.
 The simpler code of 5.2.0 works as expected (and it hits the registry
with every request, but I can live with that).



[2007-04-26 02:13:08] martin at itmission dot com

Possibly noteworthy, the exact same configuration works fine in PHP
5.2.0.



[2007-04-26 01:41:12] martin at itmission dot com

I understand that I was wrong to try to make it work with
auto_prepend_file.

When I remove auto_prepend_file and specify only display_errors = on
(PHP_INI_ALL), and change my scripts to ?php phpinfo(); ?, www1 shows
Display Errors: On, and www2 shows Display Errors: off.  Deleting www1
or renaming it to www3 causes www2 to show Display Errors: on.

When I create a fake error, like trying to open a nonexistent file,
www1 displays the error, while www2 does not.



[2007-04-25 20:49:10] [EMAIL PROTECTED]

As documented in http://php.net/configuration.changes the registry keys
do not work with PHP_INI_PERDIR ini values.

You can see which ini value category it belongs to at:
http://php.net/manual/en/ini.php#ini.list

Only those marked PHP_INI_USER or PHP_INI_ALL will work.



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

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


#41192 [NEW]: Per Directory Values only work for one key

2007-04-25 Thread martin at itmission dot com
From: martin at itmission dot com
Operating system: Windows Server 2003
PHP version:  5.2.1
PHP Bug Type: PHP options/info functions
Bug description:  Per Directory Values only work for one key

Description:

I am trying to configure multiple websites under IIS using ISAPI.  For
each site I would like to configure specific PHP directives.  My directives
only work on the first entry I make (lexicographically, not
chronologically).

Reproduce code:
---
Using Regedit
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www1\auto_prepend_file c:\inetpub\www1\include1.php
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www2\auto_prepend_file c:\inetpub\www2\include2.php

Files
Create c:\inetpub\www1\include1.php containing ?php echo('1'); ?
Create c:\inetpub\www2\include2.php containing ?php echo('2'); ?
Create c:\inetpub\www1\index.php containing ?php echo('hello'); ?
Create c:\inetpub\www2\index.php containing ?php echo('hello'); ?

IIS
Make the two sites (www1 and www2) and configure PHP on them.

Web Browser
Visit http://www1/index.php
Visit http://www2/index.php


Expected result:

http://www1/index.php:
1hello

http://www2/index.php:
2hello


Actual result:
--
http://www1/index.php:
1hello

http://www2/index.php:
hello

If I delete HKLM\Software\PHP\Per Directory Values\c\inetpub\www1, or
rename it to HKLM\Software\PHP\Per Directory Values\c\inetpub\www3
http://www2/index.php changes:
2hello

However at that point www1 no longer prepends the file.  This is the case
with all directives, not just auto_prepend_file.

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


#41192 [Bgs-Opn]: Per Directory Values only work for one key

2007-04-25 Thread martin at itmission dot com
 ID:   41192
 User updated by:  martin at itmission dot com
 Reported By:  martin at itmission dot com
-Status:   Bogus
+Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows Server 2003
 PHP Version:  5.2.1
 New Comment:

I understand that I was wrong to try to make it work with
auto_prepend_file.

When I remove auto_prepend_file and specify only display_errors = on
(PHP_INI_ALL), and change my scripts to ?php phpinfo(); ?, www1 shows
Display Errors: On, and www2 shows Display Errors: off.  Deleting www1
or renaming it to www3 causes www2 to show Display Errors: on.

When I create a fake error, like trying to open a nonexistent file,
www1 displays the error, while www2 does not.


Previous Comments:


[2007-04-25 20:49:10] [EMAIL PROTECTED]

As documented in http://php.net/configuration.changes the registry keys
do not work with PHP_INI_PERDIR ini values.

You can see which ini value category it belongs to at:
http://php.net/manual/en/ini.php#ini.list

Only those marked PHP_INI_USER or PHP_INI_ALL will work.



[2007-04-25 20:22:57] martin at itmission dot com

Description:

I am trying to configure multiple websites under IIS using ISAPI.  For
each site I would like to configure specific PHP directives.  My
directives only work on the first entry I make (lexicographically, not
chronologically).

Reproduce code:
---
Using Regedit
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www1\auto_prepend_file c:\inetpub\www1\include1.php
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www2\auto_prepend_file c:\inetpub\www2\include2.php

Files
Create c:\inetpub\www1\include1.php containing ?php echo('1'); ?
Create c:\inetpub\www2\include2.php containing ?php echo('2'); ?
Create c:\inetpub\www1\index.php containing ?php echo('hello'); ?
Create c:\inetpub\www2\index.php containing ?php echo('hello'); ?

IIS
Make the two sites (www1 and www2) and configure PHP on them.

Web Browser
Visit http://www1/index.php
Visit http://www2/index.php


Expected result:

http://www1/index.php:
1hello

http://www2/index.php:
2hello


Actual result:
--
http://www1/index.php:
1hello

http://www2/index.php:
hello

If I delete HKLM\Software\PHP\Per Directory Values\c\inetpub\www1, or
rename it to HKLM\Software\PHP\Per Directory Values\c\inetpub\www3
http://www2/index.php changes:
2hello

However at that point www1 no longer prepends the file.  This is the
case with all directives, not just auto_prepend_file.





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


#41192 [Opn]: Per Directory Values only work for one key

2007-04-25 Thread martin at itmission dot com
 ID:   41192
 User updated by:  martin at itmission dot com
 Reported By:  martin at itmission dot com
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows Server 2003
 PHP Version:  5.2.1
 New Comment:

Possibly noteworthy, the exact same configuration works fine in PHP
5.2.0.


Previous Comments:


[2007-04-26 01:41:12] martin at itmission dot com

I understand that I was wrong to try to make it work with
auto_prepend_file.

When I remove auto_prepend_file and specify only display_errors = on
(PHP_INI_ALL), and change my scripts to ?php phpinfo(); ?, www1 shows
Display Errors: On, and www2 shows Display Errors: off.  Deleting www1
or renaming it to www3 causes www2 to show Display Errors: on.

When I create a fake error, like trying to open a nonexistent file,
www1 displays the error, while www2 does not.



[2007-04-25 20:49:10] [EMAIL PROTECTED]

As documented in http://php.net/configuration.changes the registry keys
do not work with PHP_INI_PERDIR ini values.

You can see which ini value category it belongs to at:
http://php.net/manual/en/ini.php#ini.list

Only those marked PHP_INI_USER or PHP_INI_ALL will work.



[2007-04-25 20:22:57] martin at itmission dot com

Description:

I am trying to configure multiple websites under IIS using ISAPI.  For
each site I would like to configure specific PHP directives.  My
directives only work on the first entry I make (lexicographically, not
chronologically).

Reproduce code:
---
Using Regedit
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www1\auto_prepend_file c:\inetpub\www1\include1.php
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www2\auto_prepend_file c:\inetpub\www2\include2.php

Files
Create c:\inetpub\www1\include1.php containing ?php echo('1'); ?
Create c:\inetpub\www2\include2.php containing ?php echo('2'); ?
Create c:\inetpub\www1\index.php containing ?php echo('hello'); ?
Create c:\inetpub\www2\index.php containing ?php echo('hello'); ?

IIS
Make the two sites (www1 and www2) and configure PHP on them.

Web Browser
Visit http://www1/index.php
Visit http://www2/index.php


Expected result:

http://www1/index.php:
1hello

http://www2/index.php:
2hello


Actual result:
--
http://www1/index.php:
1hello

http://www2/index.php:
hello

If I delete HKLM\Software\PHP\Per Directory Values\c\inetpub\www1, or
rename it to HKLM\Software\PHP\Per Directory Values\c\inetpub\www3
http://www2/index.php changes:
2hello

However at that point www1 no longer prepends the file.  This is the
case with all directives, not just auto_prepend_file.





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


#41192 [Opn]: Per Directory Values only work for one key

2007-04-25 Thread martin at itmission dot com
 ID:   41192
 User updated by:  martin at itmission dot com
 Reported By:  martin at itmission dot com
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows Server 2003
 PHP Version:  5.2.1
 New Comment:

I am assuming that it has something to do with the massive change to
registry.c between 5.2.0 and 5.2.1 changelogged as implemented registry
cache that prevent registry lookup on each request. In case of
modification of corresponding registry-tree PHP will reload it
automatic.

Perhaps something in the way it's being cached is not working properly.
 The simpler code of 5.2.0 works as expected (and it hits the registry
with every request, but I can live with that).


Previous Comments:


[2007-04-26 02:13:08] martin at itmission dot com

Possibly noteworthy, the exact same configuration works fine in PHP
5.2.0.



[2007-04-26 01:41:12] martin at itmission dot com

I understand that I was wrong to try to make it work with
auto_prepend_file.

When I remove auto_prepend_file and specify only display_errors = on
(PHP_INI_ALL), and change my scripts to ?php phpinfo(); ?, www1 shows
Display Errors: On, and www2 shows Display Errors: off.  Deleting www1
or renaming it to www3 causes www2 to show Display Errors: on.

When I create a fake error, like trying to open a nonexistent file,
www1 displays the error, while www2 does not.



[2007-04-25 20:49:10] [EMAIL PROTECTED]

As documented in http://php.net/configuration.changes the registry keys
do not work with PHP_INI_PERDIR ini values.

You can see which ini value category it belongs to at:
http://php.net/manual/en/ini.php#ini.list

Only those marked PHP_INI_USER or PHP_INI_ALL will work.



[2007-04-25 20:22:57] martin at itmission dot com

Description:

I am trying to configure multiple websites under IIS using ISAPI.  For
each site I would like to configure specific PHP directives.  My
directives only work on the first entry I make (lexicographically, not
chronologically).

Reproduce code:
---
Using Regedit
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www1\auto_prepend_file c:\inetpub\www1\include1.php
Add HKLM\Software\PHP\Per Directory
Values\c\inetpub\www2\auto_prepend_file c:\inetpub\www2\include2.php

Files
Create c:\inetpub\www1\include1.php containing ?php echo('1'); ?
Create c:\inetpub\www2\include2.php containing ?php echo('2'); ?
Create c:\inetpub\www1\index.php containing ?php echo('hello'); ?
Create c:\inetpub\www2\index.php containing ?php echo('hello'); ?

IIS
Make the two sites (www1 and www2) and configure PHP on them.

Web Browser
Visit http://www1/index.php
Visit http://www2/index.php


Expected result:

http://www1/index.php:
1hello

http://www2/index.php:
2hello


Actual result:
--
http://www1/index.php:
1hello

http://www2/index.php:
hello

If I delete HKLM\Software\PHP\Per Directory Values\c\inetpub\www1, or
rename it to HKLM\Software\PHP\Per Directory Values\c\inetpub\www3
http://www2/index.php changes:
2hello

However at that point www1 no longer prepends the file.  This is the
case with all directives, not just auto_prepend_file.





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


#36239 [NEW]: $_SESSION Array Assignment Fails

2006-01-31 Thread martin at itmission dot com
From: martin at itmission dot com
Operating system: Windows
PHP version:  5.1.2
PHP Bug Type: Session related
Bug description:  $_SESSION Array Assignment Fails

Description:

$_SESSION does not keep results when assigned an array variable.

Reproduce code:
---
test1.php

?php

session_start();

echo(a href=\{$_SERVER['PHP_SELF']}\click/a);
print_r($_SESSION);
$_SESSION = array('id' = 1, 'user' = 'test');

session_write_close();

?

test2.php

?php

session_start();

echo(a href=\{$_SERVER['PHP_SELF']}\click/a);
print_r($_SESSION);
$row = array('id' = 1, 'user' = 'test');
$_SESSION = $row;

session_write_close();

?

test3.php

?php

session_start();

echo(a href=\{$_SERVER['PHP_SELF']}\click/a);
print_r($_SESSION);
$row = array('id' = 1, 'user' = 'test');
$_SESSION = $row + array();

session_write_close();

?


Expected result:

Test1.php: Works
Test2.php: Fails
Test3.php: Works

Actual result:
--
Test1: clickArray ( [id] = 1 [user] = test )
Test2: clickArray ( )
Test3: clickArray ( [id] = 1 [user] = test )


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