faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 9 people (67%) answered Yes
Recently 6 of 9 people (67%) answered Yes

Entry

How can I avoid getting a error when I click a link in a page while it is loading a big record list?

Apr 15th, 2008 23:03
dman, Wouter van Vliet, juliana barbiero, http://www.ttnr.org


To just prevent errors from being displayed, you can make a call to 
    error_reporting(0);
which will simply disable displaying errors. Common errors which can 
happen while handling big amounts of data are:
- Memory limit exceeded
   This means that your PHP script is using more memory than the 
maximum amount. To avoid this kind of errors, change the memory limit 
or (ini_set('memory_limit', '30M')), even better, prevent your script 
from using more than (the typical) 8MB. You can do this by lowering 
the amount of data parsed through your script or unset() a variable 
which contains a lot of data when you're done using it.
- Max execution time exceeded
   Basically the same idea. Change the max execution time (ini_set
('max_execution_time', 300)) or make your script faster.