php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49087 Session: PHP cannot serialize strings in an object that contain apostrophes
Submitted: 2009-07-28 13:40 UTC Modified: 2009-07-29 14:44 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: anis at boubaker dot ca Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.3.0 OS: Linux Ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: anis at boubaker dot ca
New email:
PHP Version: OS:

 

 [2009-07-28 13:40 UTC] anis at boubaker dot ca
Description:
------------
When we use session-set-save-handler to save session data in database and we want to save an object that encapsulates strings, we get the following exception if the string(s) contains an apostrophe. 

The exception raised is: 

Fatal error: Exception thrown without a stack frame in Unknown on line 0

Reproduce code:
---------------
---
From manual page: function.session-set-save-handler
---

Please find the source code (slightly more than 20 lines) at this URL:

http://www.cibaxion.com/php/PHPBug-AnisBoubaker.txt

Expected result:
----------------
No exception raised, session's data saved into database.

Actual result:
--------------
Fatal error: Exception thrown without a stack frame in Unknown on line 0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-28 15:51 UTC] jani@php.net
Can your reproduce this without PDO? Please try simplify the code to 
bare minimum and to not contain such requirements. Now it might be 
anything throwing exception, most likely PDO for inv
 [2009-07-28 15:51 UTC] jani@php.net
Can your reproduce this without PDO? Please try simplify the code to 
bare minimum and to not contain such requirements. Now it might be 
anything throwing exception, most likely PDO for some invalid SQL..
 [2009-07-28 19:30 UTC] anis at boubaker dot ca
It was not related to session management but PDO throwing an exception because of an SQL error....)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 19 06:00:03 2025 UTC