Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script execution memory issues

Status
Not open for further replies.

progman1010

Programmer
Jan 2, 2008
108
US
This problem happens intermittently. Sometimes the script executes OK, other times the script crashes due to PHP running Out of Memory. (and the sometimes is even with the same imported file and only 10 minutes apart)

What the script does is take a CSV file sitting on the server and imports it into the database. I even added mysql_free_result() and unloads() around the code and it didn't help.

The specific problem happens in the member record, where i'm importing 4000+ records at a time.

Any help would be appreciated.

The code is in the attached text file.
 
here's the error message:
Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/generic5/public_html/contents/admin_super/uploaders_run.php on line 25

Fatal error: Out of memory (allocated 51904512) (tried to allocate 35 bytes) in /home/generic5/public_html/contents/admin_super/uploaders_run.php on line 112
 
Code link is throwing up a 404 error.

~Ben
"Insert witty statement here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top