Take the tour ×

I got a php script running every 1 hour on my server (a thread). What this thread is doing is, the user can upload excel files with data, the thread compares the data in the excel file with that in the database and does something (not relevant some inserts in the database if the found rows dont exist). To read the excel file i call the :

$data = new Spreadsheet_Excel_Reader();

the user can upload more xls files, on the server called: File_1.xls, File_2.xls ,File_3.xls i read the first file get all the data do all the compares do all the inserts this can take a while sometimes its over 6000 rows in excel. I noticed that if the thread runs to long, for example he can insert file 1 and file 2 and file to is a big one like 6000+ rows i get an Abort in my error log. I think it is the excel readers fault. Any ideas?

share|improve this question
What is the exact error message that you get? –  Jack Nov 15 '12 at 7:23
Aborted. Thats all. Cant realy work with that... :D –  Barta Tamás Nov 15 '12 at 7:30
its php 5.4.7 it helps –  Barta Tamás Nov 15 '12 at 10:09
add comment

1 Answer

up vote 3 down vote accepted

As I understand your Server does not have enough memory (RAM) to hold multiple file pointer and big array data. Increase the memory of your server or try different algorithm to read data from XLS to do the compare insert.

share|improve this answer
not sure about that. Cause when i import the 60k row excel first he script reads it whiout problem, and then comes the small one and stops. –  Barta Tamás Nov 15 '12 at 11:41
i just noticed i use unset() on my arrays before i read the second file, my that be a problem? –  Barta Tamás Nov 15 '12 at 12:12
ok found the error, you can not unset() a private variable... that caused the Abort error... –  Barta Tamás Nov 15 '12 at 14:40
add comment

Your Answer


