Drupal Image module help is needed

Does anyone here have a running version of Drupal with the image module installed and working correctly?

I keep getting the “open_basedir restriction in effect” error in the Administration » image management screen. I have tried everything I can think of, but I am pretty new to php, mysql, etc.

I did try the .htaccess fix (AddType php-cgi .php), but Drupal didn’t like that at all.

Any and all help is greatly appreciated.


Hm, does this help you?:


  • wil

Not really. I looked through all the replies, but can’t see a fix to my problem in there.

I looked through some of the source php that is causing the problem. I think I see it now. In drupal you can install modules to add functionality. The image.module uses imagemagick to do photo conversions. One of the settings is to the convert utility. I just noticed that it calls exec. Something that dreamhost has turned off ( https://panel.dreamhost.com/kbase/index.cgi?area=2526&keyword=exec). If I add the line AddType php-cgi .php to my .htaccess file, then Drupal give me warnings that the magic_quotes_gpc value should be set to 0 (which it is).

Maybe I just won’t be able to use the image.module. That would be unfortunate. Any ideas?


As of Drupal 4.2, adding “AddType php-cgi .php” to .htaccess (after “#Set some options”) does allow the image module to work. However, at the same time it messes up text story posting by escaping ’ and " characters (it adds backslashes to them). Apparently this is because the php-cgi wrapper doesn’t handle magic_quotes settings properly.

What this means in practice is that if you just want to allow yourself as Drupal administrator to create images, you can do that by editing .htaccess, creating your images, and then restoring .htaccess to get rid of the AddType line. But you won’t be able to let ordinary users create images, no dice.

(Unless, and it’s a big unless, everyone is willing to use the HTML entities “’” and “”" instead of ’ and " in all text posts!)

So that’s why I see this problem with Gallery all the time.