Magento无法在上传产品图片时创建目录

时间:2014-08-22 07:39:14

标签: admin product magento-1.8 image-upload

对magento非常新,使用magento创建了一个站点。所有功能在localhost中都能正常工作。当我将该代码上传到在线(服务器)时,我遇到了一个问题。除了所有功能都正常工作。

While am uploading an image i got the issue "Unable to create directory".
Images are uploading to tmp path but not moving to target path. Because when am press the button 'upload files', I can able to see the upload percentages. That is why am thing the files are not moving due to dynamic directory creation fails.

I have tried lot but i can't able to make it as work.

I had tried the following solution,
  1. Changed the media file permission to 777.
  2. Created one tmp directory under /var/ directory and assigned manually in as tmp directory by change the line 91 of lib/Zend/Cache/Backend/File.php ('cache_dir' => null to 'cache_dir' => 'var/tmp').
  3. Changed the php.ini file under the magento root directory.
     Newly added lines are,
         magic_quotes_gpc = off
         short_open_tag = on
         extension=pdo.so
         extension=pdo_mysql.so
  4. Checked whether GD library installed or not. It was installed.
  5. Changed scope attribute in Magento admin panel -> Catalog -> Attributes -> Manage attributes. After this you should find image, small_image & thumbnail attributes. Then am changed all these attributes scope to Global.

非常感谢提前。请分享你的想法。随时发表您的评论。

1 个答案:

答案 0 :(得分:0)

最后我在2014年8月22日得到了解决方案。

问题是PHP版本问题,megento需要php 5.2.13但我的服务器包含php 5.2.12

更新php版后,图片上传工作正常。