Problem with Zend Framework and MySQL Longtext and Longblob generating out of memory error

E-mail
Written by Henrik, Wednesday, 11 March 2009 Last Updated ( Wednesday, 11 March 2009 17:23 )

I have had a bug in one of my apps for quite some time now. Trying to find the problem codewize ended up being futile. The problem occurs when trying to fetch a LONGTEXT or LONGBLOB with Zend_db Mysqli resulting in an error message like this;

Fatal error: Out of memory (allocated 6029312) (tried to allocate 4294967294 bytes) in /Users/hussfelt/Sites/testproject/library/Zend/Db/Statement/Mysqli.php on line 209

After some googleing I found that there was an issue in Zend Framework, that unfortunately has not been resolved yet. A ticket on this can be found over at Zend Frameworks Issue tracker.

The solution is to change to using MEDIUMTEXT or MEDIUMBLOB instead which will work for systems not storing data larger then 16MB each.

For those of you using more then that and need access to LONGTEXT and LONGBLOB which can store up to 4GB of data, will need to push for this at the issue tracker.

Like this Joomla template?

As many other things on this site it is completely free! In collaboration with Midsjö AB are we releasing it into the public domain under the GNU/GPL version 2 license. You will find this template and other extensions under the Labs section then Joomla!. Good luck and happy Joomling!