Memory problem in PHP simple HTML DOM
Allowed memory size of 67108864 bytes exhausted,
and this is because simple HTML dom don't free up the memory in real time, so the solution is:
Each time you create a dom object ( foe exemple using: $html = file_get_html("http://someurl/"); or str_get_html... ), then when you don't need it anymore you have to call _destruct:
$html->_destruct();
unset($html);
21 comments:
-
Anonymous said...
-
thanks so much for posting this!
but there is a type. it should be __destruct, not _destruct. -
March 15, 2011 at 12:46 AM
-
Wojtek said...
-
Thanks a lot!
I was looking for a solution to this problem and that was it.
Would be good to fix the typo, though. Like the guy above wrote, there's a double _
Cheers. -
April 13, 2011 at 4:28 AM
- Facebook App Developer said...
-
yes,
i also was surfing the net for this problem like Wojtek,
and now i have solve my prob,
thanks -
April 23, 2012 at 1:59 AM
-
Anonymous said...
-
Thank you very much!
-
August 7, 2012 at 9:07 AM
- TechToyz said...
-
Again an awesome Article
-
August 22, 2012 at 5:29 AM
- rize wordpress said...
-
Our company has cumulative decades of experience programming PHP in all sorts of applications. PHP Programmers
-
September 6, 2012 at 2:35 AM
- Lia said...
-
Thanks for sharing this information and I know it can helpful. I will save it so that if I can encounter a problem in PHP I can use it. Keep it up.
-
December 17, 2012 at 10:54 PM
- Fully Help said...
-
Nice blog...Very useful information is providing by ur blog. Great beginning php tutorials Very clear and helpful for beginners.
-
August 4, 2015 at 4:12 AM
- Giri Mani 2 said...
-
This blog is having the general information. Got a creative work and this is very different one. We have to develop our creativity mind. This blog helps for this.
Thank you for this blog. this is very interesting and useful.
Digital Marketing Company in Chennai -
August 19, 2016 at 5:45 AM
- Sowmiya said...
-
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
Best Android Training Institute in Chennai -
August 23, 2016 at 12:18 AM
- Samsunda cilingir said...
-
Selam yonetici admin siteniz cok guzel basarilarinizin devamini bekleriz
-
December 7, 2016 at 7:24 AM
- Shalini said...
-
Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
seo company in india -
January 6, 2017 at 9:57 PM
- jeslin said...
-
Actually social media is the powerful tool to make our project to be visible worldwide. Here this type of article will enable us to know the tricks and tips within the marketing. So please keep update like this.
Back to Original -
February 10, 2017 at 1:39 AM
- Prasanth said...
-
A very well-written post. I read and liked the post and have also bookmarked you. All the best for future endeavors. Getting some solution regarding.
UI Designing Company in Bangalore, Web Application Development Companies in Bangalore -
March 30, 2017 at 3:08 AM
- Dipika Takali said...
-
Excellent info, keep sharing useful post with us
Web Design Company Bangalore | web Development Company in Bangalore | UI Design Company Bangalore | Ecommerce web design company Bangalore -
May 16, 2017 at 4:20 AM
- Shruti s said...
-
Very informative post on PHP, If you could explain more it would be helpful for us.
Thanks for the post. You have explained the topic in very simple and step by step
Web Design company in Hubli | web designing in Hubli | SEO company in Hubli -
May 16, 2017 at 10:19 PM
- Digital Khabar said...
-
बालों की सुंदरता को बढ़ाने के तरीके
रिंकल्स को कम करने के उपाए
घर पर जल्दी वजन घटाने के उपाय
मुँहासे और चहरे पर दाने हटाने के उपाय
कब्ज़ की समस्या
सीने में जलन के लिए घरेलू उपचार -
August 8, 2017 at 12:14 PM
- Rinki Sinha said...
-
ladkiyo se facebook par dosti
how to remove pimples marks
blue whale suicide game
home made ac with ice
independence day quotes
mobile balance transfer kaise kare -
August 12, 2017 at 1:50 AM
- sandhosh said...
-
Good blog post which provided a interesting information.keep updating...
SEO Company in India -
August 17, 2017 at 8:55 PM
- Netguru Solution India Pvt. Ltd. said...
-
Netguru Solution India Pvt. Ltd. is one of the leading Website Design and Mobile Application Development Company in Pune.
Website Design Company In Pune
Web Design Company In Pune
Website Development Company In Pune
Mobile Application Development Company In Pune
Android App Development Company In Pune
iOS App Development Company In Pune -
January 29, 2018 at 10:10 PM
- Ancy merina said...
-
I am grateful for this blog to give me much learning with respect to my zone of work. I additionally need to make some option on this stage which must be in information of individuals who truly in require. Much obliged.
Website Development Services in Bangalore| website designers in bangalore -
March 4, 2018 at 9:51 PM
Categories
- 1-General (3)
- 2-Getting started (4)
- 3-Strings (10)
- 4-Server config (1)
- 5-Best scripts (7)
- email (4)
- files (6)
- Forms (3)
- If statements (3)
- Loop statements (2)
- Mysql (2)
- Server variables (3)
- Sessions (1)
- Tutorials-planet.com (1)
- web hosting (1)
- You need a programmer ? (1)
