Part of the EllisLab Network
   
 
mysql_real_escape_string
Posted: 18 December 2006 08:58 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  572
Joined  09-30-2006

mysql_driver->escape_str($str)

On my system this function pukes with a warning that mysql_real_escape_str was expecting a resource identifier but received a boolean when $str is ‘’.

I assume this is a PHP bug rather than a CI bug. But perhaps this could be smoothed by checking for an empty string in which case escaping would not be required. I’m running 5.1.6 on OSX Tiger.

Just letting you know ...

Profile
 
 
Posted: 18 December 2006 10:12 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  572
Joined  09-30-2006

False alarm. Sorry!

The reason for these errors was related to the changes in PHP5 where variables get destroyed before the write/close handlers of a session handler are called. My session handler was using a the default database class referenced in the global CI object, whose connection was already closed when the write handler was firing. Boy oh boy - why in the world did Zend change that?

Profile
 
 
Posted: 18 December 2006 10:17 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6762
Joined  03-23-2006

I think it was a conspiracy by the Zend framework people to make it look like CI had bugs… those rascals… wink

Thanks for updating your thread.  I was going to quickly try to recreate the problem myself, you probably just saved me an hour.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66430 Total Logged-in Users: 33
Total Topics: 84793 Total Anonymous Users: 3
Total Replies: 455049 Total Guests: 211
Total Posts: 539842    
Members ( View Memberlist )
Newest Members:  Dylan1978X_franbaguasllogocsaturkeyPeter BryanttherendStudioGeorgiaJZeerfedeghe