Subject: | PHP::Session |
Date: | Tue, 23 Feb 2010 02:43:15 +0000 |
To: | "bug-PHP-Session [...] rt.cpan.org" <bug-PHP-Session [...] rt.cpan.org> |
From: | Scott Stanton <stanton [...] electric-cloud.com> |
I am trying to use the PHP::Session package and have run into a few issues trying to update a session file:
* On Windows, the save() function is not setting binmode(), so text that contains newlines results in a corrupted session file.
* The order of elements in PHP arrays is not preserved.
* String data that looks like a floating point number is being converted to a float and then saved as a number, losing the string formatting. For example, a string value of "1.0" gets saved as a floating point "1.0", which php will turn into "1" on reload, losing the formatted representation.
I have patches for all of these issues that I would like to contribute back. My changes are:
* Use binmode in save()
* Use Tie::IxHash to preserve the ordering of array elements
* Added a configuration option to suppress conversions to numeric types
I have attached a patch against 0.27 that I hope you will consider including in a new version. Please let me know if you have any questions.
--Scott
Message body is not shown because sender requested not to inline it.