2

I am very new to magento. I have created one magento store, that is working fine in the localhost. But in server it's working fine except product image upload. I can able to create new product but product images are not uploading. I got this error:

unable to create directory /var/www/vhosts/.../httpdocs/media/tmp/catalog/product/...

Please refer the following screenshot.

enter image description here

Tried out following:

  1. Checked the /media folder permission that is in 777
  2. Changed the php_value memory_limit 128M to 256M in .htaccess
  3. GD library is installed
  4. Changed attribute scope of small image, large image, thumbnail scope (panel -> Catalog -> Attributes -> Manage attributes) from stroe view to global
  5. Tried this http://marius-strajeru.blogspot.in/2011/09/upload-issue-for-magento-1600.html link.

Still am not get any solution. It wasted my time around 2 days.

Please any one help me.

  • is this issue sovled?? What is the solution for this? – Pavan Kumar Oct 30 '14 at 6:18
  • Usually a file permission AND ownership issue. Ownership as the logged in sftp user is not the same as running owner of the web server process. Not sure how a minor PHP upgrade would have fixed the issue, sounds like an server management issue. – Fiasco Labs Feb 15 '15 at 2:14
1

Finally I got solution at 22-Aug-2014.

Problem is PHP version issue, megento need php 5.2.13 but my server contains php 5.2.12

After updated php version, image upload working fine.

0

I have faced same problem earlier and I have solved this.

It was issue with lot of file in media/temp/catalog/product/s/a directory that means lake of files on this folder which prevent by the server

  • But there is no file inside that folder (media/temp/catalog/product/s/a). – Durai Aug 21 '14 at 10:30
  • how many folder and file in media/temp/catalog/product/?? – Amit Bera Aug 21 '14 at 10:37
  • Thanks Amit for your quick reply, But there is no file inside that folder (media/temp/catalog/product/s/a). I want to mention one more thing, manually changed the temp directory to var/tmp in lib/Zend/Cache/Backend/File.php. In new temp folder also no file / directory exists. I have chagned the line 91 ('cache_dir' => null to 'cache_dir' => 'var/tmp') and changed permissions too. – Durai Aug 21 '14 at 10:43
  • is it works your solution – Amit Bera Aug 21 '14 at 10:44
  • Only one folder with the name 's' and it has one sub folder named 'o'. One these two folders are exists. – Durai Aug 21 '14 at 10:45
0

Surprised nobody mentioned disk space. Here's how to increase it:

https://devdocs.magento.com/cloud/project/manage-disk-space.html#no-space-left

-2

This issue can be resolver making in /var/www

I got the solution for this problem. This problem may have two cause and both are based with the file permission.. 1. Please check that you have a temp folder in media. Some time its not created in time of installation like was in my case. If yes the create a folder name tmp and also give the permission 777 so mangento code can create sub folders for images. 2. Also check that you have a folder name with catalog in media folder. And in media folder should be subfolder name category and product and pls give the permissio 777 to all.

-2

Go to this file: app\code\core\Mage\Catalog\Model\Product\Image.php and comment these lines:

if ($file && $file != 'no_selection' && !$this->_checkMemory($baseDir . '/' . $file)) { 
     $file = null;

maybe it works for you. :)

  • 5
    Never edit the core code. and by never I mean NEVER. – Marius Nov 25 '14 at 15:28

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.