Page 1 of 1

php memory problem

Posted: Tue Jul 14, 2009 6:42 am
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

Re: php memory problem

Posted: Tue Jul 14, 2009 12:13 pm
by Skara
include() has nothing to do with your problem.
Post your search code.

Re: php memory problem

Posted: Tue Jul 14, 2009 2:06 pm
by yacahuma
which webserver are you using? What is your computer configuration?