Answer the question
In order to leave comments, you need to log in
Script fails and redirects to main?
In general, I encountered such a problem.
I am uploading a large .csv file, about 300 MB, among other things, this file contains a link to an image that needs to be uploaded to the server, and then update the data in the database.
During execution, the script performs a maximum of 100 iterations and redirects to the main page.
Please tell me what is causing this and how it can be avoided.
Answer the question
In order to leave comments, you need to log in
As they say: miracles do not happen - look for a mistake.
Look in the fire bug to see how the redirect happens, if it happens at all. I suggest looking in your code for "Location:" and put exit there with debug_prit_backtrace();
As one of the possible situations, some kind of fatal error/exception occurs and the script runs the error_handler/exception_handler/shutdown_function where the redirect happens.
Try to pull out a smaller number of records from the file (~ 30). If everything is done, then see habrahabr.ru/qa/17458/#answer_71933
If it does not help, then you need to look at the code.
Maybe the web server got tired of waiting and decided to redirect to the main one due to a timeout? Or did some very smart service not like the fact that something is taking a very long time and it killed the process?
Is there anything interesting in the web server logs?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question