PHP sends a local file to an insert100M file in MySQL to the web server using ajax, and the backend sends the received file to MySQL through PHPinsert.
When the file size is smaller than MB, the insert operation can be successful. when the file size is greater than MB, the PHP program will stop when it moves to the insert operation,
The subsequent code is not executed, and the program will not report an error.
Reply to discussion (solution)
Timeout!
Can't you cut the file into small pieces and insert them separately?
It is not ruled out that your file is not uploaded successfully.
Timeout!
Can't you cut the file into small pieces and insert them separately?
Will no error be reported if the timeout occurs? My files are directly inserted into the MySQL table.
The time required for database operations is not counted within the php runtime. Therefore, php does not necessarily report an error when the overall timeout occurs.
The time required for database operations is not counted within the php runtime. Therefore, php does not necessarily report an error when the overall timeout occurs.
Php I set never Times out... How?
The web server also has a timeout problem.
The web server also has a timeout problem.
The IIS server is set to 5000 seconds, and the actual execution time of the program cannot exceed 15 minutes
The data is too big. you should try another method.
Paste the code to see it.
The file is not successfully written. you can view the server logs.
Points? Ratio? Okay, or use ftp first? To the server? And then? Insert Row
Points? Ratio? Okay, or use ftp first? To the server? And then? Insert Row
Dare to ask how to partition! I have never done file upload! Why do I use ftp to upload files! Is normal Upload slow? Another question is, can php call ftp for uploading? Why does the database still exist when I upload the file to the server?
Isn't it good to store such a large file directly to the disk?
The database is busy.
The database is busy.
Http://goobbe.com/questions/1363628/how-to-save-large-files-in-mysql-database
Save a path to the database.
Finally, you can solve this problem by modifying some attributes in the MySQL configuration file.