Magento 1.9 and php7.0  - image upload error File was not uploaded

Hello, We have face issue in admin area. "Showing error File was not uploaded"




and make this change https://i.stack.imgur.com/6uVeh.jpg .

source info from error php 7.0

Option 2 . Patch SUPEE-7405 made changes on permissions files .

Upload File Permissions

The patch restores less restrictive file permissions (0666 for files and 0777 for directories) as more strict permissions introduced by the original SUPEE-7405 patch caused many merchants not to be able to view uploaded product images, depending on hosting provider configuration.

To fix that: on this file lib/Varien/File/Uploader.php

change this chmod($destinationFile, 0640) to chmod($destinationFile, 0644)

  • Already exist this changes. //run validate callbacks foreach ($this->_validateCallbacks as $params) { if (is_object($params['object']) && method_exists($params['object'], $params['method'])) { $params['object']->{$params['method']}($this->_file['tmp_name']); } } – Mahesh Sharma Oct 30 '18 at 13:59
  • updated my answer please check. – Ylgen Guxholli Oct 30 '18 at 14:09
  • We have already changed this chmod($destinationFile, 0640) to chmod($destinationFile, 0644) . but still showing error – Mahesh Sharma Oct 30 '18 at 14:17
  • Please provide a solution for this problem. – Mahesh Sharma Oct 30 '18 at 14:21
  • add the permissions following Mathew answer stackoverflow.com/questions/34957448/… – Ylgen Guxholli Oct 30 '18 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.