open_basedir issues with Graphics toolkit activation (PHP 5.4.1/Apache 2.2.22)

scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sat, 2012-04-28 09:51

I have Gallery 2.3.2 running on this same public_html area as Gallery 3 (git clone), the latest fixes the PHP 5.4.x issues but after logging in, I'm prompted to install a graphics toolkit.

Quote:
ImageMagick is installed, but PHP's open_basedir restriction prevents Gallery from using it.
GraphicsMagick is installed, but PHP's open_basedir restriction prevents Gallery from using it.

I don't have GD compiled with PHP because ImageMagick is the toolkit I use for my hosted G2 multisites.

with both platforms running on the same <VirtualHost> and <Directory> container that has "php_admin_value open_basedir /usr/local/bin/", why would G3 residing in /home/steve/public_html/gallery3/ complain about open_basedir when in G2 residing in /home/steve/public_html/gallery2/) doesn't?

in G3 > Advance Settings only provides an override for the ffmpeg binary, not ImageMagick or GraphicsMagick?

Quote:
gallery ffmpeg_path /usr/local/bin/ffmpeg

Gallery 3.0+ (branch master, build 194) - https://pixi.me/gallery3/
Gallery 2.3.2 multisite - https://pixi.me/gallery2/

Test Settings for ImageMagick renders this just fine:

Quote:
ImageMagick binary test results
Binary Name Pass/Fail
identify
Passed
convert
Passed
composite
Passed
Version

ImageMagick 6.7.5-10
Supported MIME Types

The ImageMagick module can support files with the following MIME types:

image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/photoshop
image/x-photo-cd
image/tga
image/jpeg-cmyk
image/tiff-cmyk
application/photoshop-cmyk

Any advise would be greatly appreciated. I'm running Apache 2.2.22 and PHP 5.4.1 - again, no issues with any of my G2 multisites.

thank you in advance!

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sat, 2012-04-28 10:46

found another issue with the same G3 install I mentioned above.

Edit Permissions render this notice:

Quote:
Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable mod_rewrite and set AllowOverride FileInfo Options to fix this.

but mod_rewrite is already enabled (rewrite module in G2 works fine) and AllowOverride FileInfo Options is already inside <Directory /home/steve/public_html/gallery3/>?

any ideas why G3 doesn't detect those settings?

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sun, 2012-04-29 04:33

filed a ticket instead - https://sourceforge.net/apps/trac/gallery/ticket/1842

__________________________________________________________
liberate your photos with Gallery, make the switch today!
https://pixi.me/

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Sun, 2012-04-29 10:27

I found one of the problem. I'm not sure if its a series of bugs, but here we go.

To recap, after installing Gallery 3, immediately I was prompted to install a Graphics Toolkit but unable to select one because of the open_basedir notice.

In /gallery3/modules/gallery/helpers/graphics.php - you have these lines that spits the error.

Quote:
$toolkits->$index->installed = false;
$toolkits->$index->error =
t("%toolkit_name is installed, but PHP's open_basedir restriction prevents Gallery from using it.",
array("toolkit_name" => $settings["name"]));

$toolkits->$index->installed = false; prevents me from selecting ImageMagick or GraphicsMagick when /gallery3/index.php/admin/graphics is in view.

changing it to $toolkits->$index->installed = true; gives me these options:

ImageMagick version is available in
Activate ImageMagick

or

GraphicsMagick version is available in
Activate Graphics Magic

after a Graphics toolkit is "activated", the following setting now appears in Settings > Advance:


gallery graphics_toolkit imagemagick
gallery graphics_toolkit_path empty

or


gallery graphics_toolkit graphicsmagick
gallery graphics_toolkit_path empty

But why is graphics_toolkit_path now set to "empty" but then uploads now magically work?

Also, if you set the line back $toolkits->$index->installed = false; - the open_basedir error once again shows up when /gallery3/index.php/admin/graphics is in view - but uploads still continue to work?

I want to offer my existing G2 users to experience how G3 works and take advantage of the IOS app, viGallery - but doing this code changes for every fresh install (git clone) is really a pain in the neck.

Please advise, thank you!

__________________________________________________________
liberate your photos with Gallery, make the switch today!
https://pixi.me/

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1148
Posted: Wed, 2012-05-16 20:18

yooosh! Bharat tagged my bug report for 3.0.5 fix. Thank you!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25957
Posted: Thu, 2013-01-24 14:51

There has been a comment added to the ticket that this bug might be solved in another ticket. Can you investigate?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team