0

I really need your help but I'm not even sure I'm describing the problem well in my title.

I am working with xampp. I have made a long php script that reads an excel file (that is already uploaded on the server) and inserts telephone calls in my database. Here is my problem...

I tried using a big file so as to check my scripts endurance/timeouts etc etc. So I used a file with 80.000+ records.

My jQuery $.ajax() sends the file's url to the server and waits for an answer. I keep watching my mysql tables to see if all is going ok and after around 20ish minutes my mysql tables stop getting more records.

My jQuery script receives no reply from the server though. After another 10 minutes or so, I get a AJAX: 0 error. I check with firebug and I get absolutely no response from the server, so my page is standing there stuck and my database is getting no more records.

It's not the default time limit that php has since

  • I changed it
  • When it was that, I used to get an error response from the server. Now I get nothing except from the AJAX: 0 error which I don't even know what it means for sure.

So is there any possible explanation?

Is it server related?

And if so, I'm running on a windows 2008 R2 server. Where should I check?

Finally, since when it comes to php I'm a total noob, especially when I need to handle a lot of data, is there maybe a better way to work except for excel? I noticed its quite slow and buggy sometimes...What are your suggestions?

Thanks in advance

** EDIT ***

I should have mentioned that my script runs fine with small files (3000ish records up to 9000ish records) and returns the intended success message but for this file it doesnt...Will follow your advise thanks for your answers!

  • Have a look here what error 0 means : http://stackoverflow.com/questions/2000609/jquery-ajax-status-code-0 – putvande Jan 31 '14 at 09:13
  • Make sure PHP error reporting is turned on, and find the error logs for PHP/Apache `C:\xampp\apache\logs` to see if there are any hints in there. Sounds like your PHP script is not completing as you expect. Another thing you can try is running your PHP script using the CLI. Add `C:\xampp\php` to your PATH environment variable and in a command window run: `php C:\path\to\your\php\script.php` and see what the output is. – Jon Jan 31 '14 at 09:19
  • Additionally, are you reading from an XLS or XLSX file? Or a CSV file? If you can use CSV instead that'll be a lot more performant with large data sets as PHP can just read the data one line at a time, rather than having to load the whole XLS file into memory (using something like PHPExcel) and then work with that. – Jon Jan 31 '14 at 09:21
  • I propably need to mention that my script runs fine and returns success when used with small files (3000ish records)... Its reading xlsx, although its able to read xls as well. Yeah i figured csv would be the best choice..Thanks for your answers, I will check the error reporting as you advised me Jon thanks alot! – Dimitrios Alteras Jan 31 '14 at 10:40

0 Answers0