开发者

Drupal 6 on IIS7 and imagecache cannot upload images

This is a site we've inherited from someone else. I'am having problems in uploading images to the site. When I initally upload via the admin, the image shows temporary,(Hence it uploads the image to thumbs directory but not the imagecache/my_preset/) However when save the content and looking the front end it doesn't show. shows red X instead.Also when I tried to browse to the image directly it shows 500 error. Drupal is setup on IIS7, Windows Server 2008 R2.

The Obvious answer might be permission an issue. IIS_USERS got Red/Write permissions setup. I have checked permissoin over and over again and went through other forums with various other fixes. But nothing worked. My file systems is set to private an开发者_JS百科d temporary folder is set to `C:\inetpub\wwwroot\mysite\htdocs\sites\default\files\temp

One other thing I have noticed is that most of the site/default/files contains a .htaccess file that contains below. Don't know if this has any impact on this (According to drupal it might be though). The system seem to be keep recreating this even I deleted it.

    .htaccess

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

Many thanks in advance.


Some questions:

  • Is IIS_USER the real user running your web app?
  • The web user must have full access to the files directory ... it needs to create directories as well?

This command could help

icacls c:\inetpub\wwwroot\drupal\sites\default /grant IUSR:F /T

but this grants too much

(taken from a meeting with Microsoft about Drupal)


  1. IIS7 does not interpret .htaccess files, so this is unlikely to be your problem. .htaccess is for Apache only.

  2. You need to have one of either imagemagick or GD installed to do the image processing.

  3. Imagecache requires URL rewriting to be working.


I have found the problem myself. The problem was PHP version I was running PHP 5.3.5 with Drupal 6.10 which is not compatible so I have downgraded this to PHP 5.2.x and now every issue I had seem to have gone away.. So as it stands now my configurations are as follows.

 1. Windows Server 2008 R2
 2. PHP 5.2.17 
 3. FastCGI Module (To Run PHP)
 4. URL Rewrite (IIS Module for URL Rewriting)

Many thanks for all the people who answered/read the question. Hope this helps to anyone. So next time when you get problems Please check the recommended PHP version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜