Image upload error. unable to create directory
-
15-04-2021 - |
문제
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.
Tried out following:
- Checked the
/media
folder permission that is in 777 - Changed the
php_value memory_limit 128M
to256M
in.htaccess
- GD library is installed
- Changed attribute scope of small image, large image, thumbnail scope (panel -> Catalog -> Attributes -> Manage attributes) from stroe view to global
- 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.
해결책
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.
다른 팁
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
Surprised nobody mentioned disk space. Here's how to increase it:
https://devdocs.magento.com/cloud/project/manage-disk-space.html#no-space-left
In magneto 1.9
I solved it purging the cache
from system/cache management
.
You will be able there to purge 4 kind if caches when I purged them all. the problem is solved.
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.
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. :)