[ Solved ] Opencart Product edit tab image upload is not working
Here i have mentioned solutions for opencart image upload issues for the product.
Opencart is one of the famous e-commerce CMS platform in PHP. We have developed one website for our customer. After migrating new server we are facing image upload issue for the product. we thought the issues are fully based on Js. But finally, we found the culprit. the problem is based on server and memory(php.ini). So we want to share the experience here.
Troubleshooting Tips for Those Who Cannot Upload Images to OpenCart
- we need to check the error.log file in the admin folder. you can see the following error ( Allowed memory size of 67108864 bytes exhausted (tried to allocate 4000 bytes) in /home/********/public_html/system/library/image.php on line 34 )
- If you are getting above message in error log. definitely, the error will be a Php.ini file
- If you are using shared hosting please contact hosting provider and ask them to increase memory size. But in some hosting provider, we can modify the php.ini file.
- If you are using a dedicated server or virtual private server. you can directly modify the php.ini file script
add the php.ini file in root folder of the website.
below code, you need to modify the php.ini file. Now we can upload product image.
“memory_limit = 512M;
max_execution_time = 300;
post_max_size = 999M;
upload_max_filesize = 998M;”
Thanks