whenever i try to upload an image on product page it gives this error:
Upload HTTP Error
Given all permissions to all the required folders and cleared cache.
Any solution?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityIf you are using PHP 7 then go to
lib/Varien/File/Uploader.php
Find the following code
$params['object']->$params['method']($this->_file['tmp_name']);
And replace it with
$params['object']->{$params['method']}($this->_file['tmp_name']);
You can check apache error log.as well as ask your hosting provider if PHP is running in FastCGI mode and if there is MaxRequestLen limitation.
You can refer the below link in which given the steps to follow to solve this error:- https://stackoverflow.com/questions/18994648/magento-upload-http-error Possible to try all this steps.
You may have exceeded the file size or dimensions that are set. I've had this error before when trying to upload an image that's several MB. Try a test image less than 500k. If it works, then try adjusting your PHP settings to something like the below:
; Maximum allowed size for uploaded files.
upload_max_filesize = 10M
; Must be greater than or equal to upload_max_filesize
post_max_size = 10M
I think it's a permission problem or you have to increase
upload_max_filesize
post_max_filesize
in the php.ini file.