php memory problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
krmkrishnan
Forum Newbie
Posts: 7
Joined: Thu Dec 04, 2008 11:36 pm

php memory problem

Post by krmkrishnan »

hi friends
im using xampp package which consists of php mysql apache in windows.
i hav created a page which has searching option in my page i have included a some file
using include("topframe.php") etc.. my problem is when im pressing t he search button many times like 10 or above the page gets hang up.and i added line

echo memory_get_usage() . "\n"; to display the memory .But each time im pressing the search button it goes up and one point of time the browse crashed and said trying to allocate more memory... and i read that if u use include in ur page and ur page is reloaded manytime the include file will be stored in the memory and finally it will create problem.in my case also in my page im using include statement and each time the page is searched the include statement will be included.My question is ,if the above statement is true then how to avoid the include statement or is there any way to free the memory..Moreover i have checked for other memory leak reason like unsetting the variable and closing the file ,closing the db resource ...

any help is most welcome
thanks in advance
krmkrishnan
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Re: php memory problem

Post by Skara »

include() has nothing to do with your problem.
Post your search code.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: php memory problem

Post by yacahuma »

which webserver are you using? What is your computer configuration?
Post Reply