Out of Memory – Line 791 of WP-DB.php (mysql_real_escape_string)
-
Hello,
I am encountering an error with a recently launched site that although the pages display, I am severely limited by the number of plugin’s that I can enable.
We started to see an error occur:
Fatal error: Out of memory (allocated 24903680) (tried to allocate 1802297 bytes) in /home/normal/public_html/normalpl.org/wp-includes/wp-db.php on line 791 Now we have tried the usual fixes of increasing PHP and WordPress memory allocations (have a VPS, with full root) all the way up to 256MB but with no affect on the error.
The following are the plugins enabled:
- CMS Tree Page View
- WP-DBManager
- Login Lockdown
- Contact Form 7
Now enabling any other plugins will start to cause these memory errors to occur. Almost always on Post/Page save operations. Notably, All in One SEO or Yoast SEO or W3 Total Cache, but others will also cause this to occur.
I noticed that in the database there were some strange Unicode Code Points that had been brought in by a cut/paste from Word and so I went through all of the Posts/Pages and escaped all of the entities so that they were not unicode but HTML Entities.
Unfortunately, the error was still occurring upon enabling one of the above plugins and saving a post/page.
I wiped out all files/configurations and started with a fresh install of WordPress and re-imported the existing database to make sure there wasn’t something strange in the files and I still encountered the issue.
I feel that I am stuck on thinking that there is some strange escaping bug going on when it hits that mysql_real_escape_string function as removing that and just dumping the plain string into the database works (but is horrible for XSS and proper MySQL escaping).
In addition, the error happens when using the older method of Add_Slashes, and I also noticed that Magic_Quotes_GPC is on if that helps. Thanks for all of the assistance, this is a baffling one for me.
-Adam
- The topic ‘Out of Memory – Line 791 of WP-DB.php (mysql_real_escape_string)’ is closed to new replies.