An error occurred while importing php Data in batches. what I want to do now is import a product data from an EXCEL file to MYSQL in PHP. during the import process, the following message is always displayed: \ wam php batch data import error
What I want to do now is import a product data from EXCEL to MYSQL in PHP. during the import process, the error "Allowed memory size of 167772160 bytes exhausted (tried to allocate 689919 bytes) in D: \ wamp \ www \ Company \ product \ admin \ uploadOrder. php on line 167 "error. when I divide it into 100th entries, this error will not be prompted. Is this a memory overflow? is there a good solution?
------ Solution --------------------
In php. ini, set the memory_limit option to a larger value, and restart apache or nginx.
------ Solution --------------------
The file is too large, so you can use the source command to directly import it!
------ Solution --------------------
Discussion
I use ini_set ('memory _ limit ','-1'); no error will be prompted. Will this affect others?
------ Solution --------------------
However, they are all set to 0. As for negative numbers, they have not been tried.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service