Imagemagick not working now, Had to go to GD Library....

Armani2

Joined: 2007-05-09
Posts: 263
Posted: Sun, 2011-06-05 01:01

For some reason when I use ImageMagick now It goes though the motions , then no photo shows, the name and a holder will show, but no thumb or resize? The photo does upload to the server, but as I said I get no photo period on the site.. GDLibrary works with errors here and there...
Can anyone help with this as I ImageMagicks Is a better all around than GDLibrary which is limited..

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Mon, 2011-06-06 07:19

I asked my host to check Imagemagick for me this is there response...

Hello,

Imagemagick is already installed on the server by default. I have also checked to make sure it is functioning:
# ./checkimagemagick
ok
# which convert
/usr/bin/convert

Please check your script settings and make sure the paths are correct. We also recommend that you try to run a conversion command and provide us with the output to check this further for you.

Regards,

http://www.arvixe.com
Arvixe, LLC

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2011-06-06 07:39

Is G3 still able to see IM under Admin > Settings > Graphics? Also check Gallery's logs under gallery3/var/logs

Sorry if this next part comes off as ahole-ish but I've been up for 18+ hours now.

Now, let's look at some real troubleshooting steps (your host could learn from this as basic troubleshooting skills are a necessity if you're going to work in the tech industry)

First, it was working

Second, you didn't say you upgraded anything so I'm assuming this is all with the same version of G3, meaning nothing has changed in G3 and either way, I'm pretty sure the code for finding and executing ImageMagick from G3 (and Kohana) hasn't changed.

Third, since it was working and the code hasn't changed then your host made a change or something else is failing on their server (tmp directory full?) and the blame lies with them.

Quote:
# ./checkimagemagick
ok

"ok" what? Do they even know what that script is doing other than some low-level tech being told what to execute to "check" if something is working? Perhaps they should try from an example of what you're trying to do, a php script run from the webserver trying to execute convert and process an image. That would be similar to what you're trying to do. Looks to me like they've only checked to make sure IM exists, probably from an elevated privileged account that has more access than you or the user that PHP or Apache run as...
____________________________________________
Like Gallery? Like the support? Donate now!

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Mon, 2011-06-06 08:46
Quote:
Is G3 still able to see IM under Admin > Settings > Graphics? Also check Gallery's logs under gallery3/var/logs

Yes I can see It and activate it..

I have these errors in var logs....

2011-06-05 21:16:13 -07:00 --- error: Kohana_Exception [ 403 ]: @todo FORBIDDEN
/home/armani2/public_html/gallery/modules/gallery/helpers/access.php [ 202 ]
#0 /home/armani2/public_html/gallery/modules/comment/controllers/comments.php(76): access_Core::forbidden()
#1 [internal function]: Comments_Controller->form_add('831')
#2 /home/armani2/public_html/gallery/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Comments_Controller), Array)
#3 [internal function]: Kohana_Core::instance(NULL)
#4 /home/armani2/public_html/gallery/system/core/Event.php(208): call_user_func_array(Array, Array)
#5 /home/armani2/public_html/gallery/application/Bootstrap.php(67): Event_Core::run('system.execute')
#6 /home/armani2/public_html/gallery/index.php(102): require('/home/armani2/p...')
#7 {main}
2011-06-05 21:16:13 -07:00 --- error: Missing messages entry kohana/core.errors.403 for message kohana/core

Quote:
Sorry if this next part comes off as ahole-ish but I've been up for 18+ hours now.

I understand, and I understand If you want to get back to me on this when you get some rest!!

Quote:
Now, let's look at some real troubleshooting steps (your host could learn from this as basic troubleshooting skills are a necessity if you're going to work in the tech industry)

First, it was working

Second, you didn't say you upgraded anything so I'm assuming this is all with the same version of G3, meaning nothing has changed in G3 and either way, I'm pretty sure the code for finding and executing ImageMagick from G3 (and Kohana) hasn't changed.

This is my mistake. I did change hosts a month ago, all seemed fine, I now realize since the changeover I have only uploaded videos and did not notice the problem until I tried to upload some
photos the other day,, Sorry for the bad information, So gallery was taken down along with the database and restored. after restore Imagemagick was active and selected by default, only through trouble shooting did i realize GDLibrary works fine but with limited extensions..

Quote:
Third, since it was working and the code hasn't changed then your host made a change or something else is failing on their server (tmp directory full?) and the blame lies with them.

Right now I think most of the blame lies on me, as im sure something changed with IM from old to new server preventing it from working and since it was not a fresh install i have no idea what or where.... Imagemagicks actions are bizzare as it does upload the full size photo within /var/gallery/albums/albumname/filename.jpg , as i can browse and view it..
On the site itself It also creates the filename, a empty thumbnail which i can click to see the non existant resize..

Quote:
# ./checkimagemagick
ok
"ok" what? Do they even know what that script is doing other than some low-level tech being told what to execute to "check" if something is working? Perhaps they should try from an example of what you're trying to do, a php script run from the webserver trying to execute convert and process an image. That would be similar to what you're trying to do. Looks to me like they've only checked to make sure IM exists, probably from an elevated privileged account that has more access than you or the user that PHP or Apache run as...

I am pretty sure it is a low level tech that sent that message as the elevated techs know gallery3 pretty well, as that is the photo site software they offer and installs through cpanel. though mine was a self install as always..
____________________________________________
Like Gallery? Like the support? Donate now!

www.armaniphotography.com/gallery

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2011-06-06 13:51

From your G3 log, that appears to be an error being thrown when trying to add a comment

Quote:
#1 [internal function]: Comments_Controller->form_add('831')

Quote:
Yes I can see It and activate it..

Since G3 can see and activate IM, there must be some other issue. I think maybe, (hopefully) just a minor one :) If you're familiar with changing some php settings, make sure the upload_tmp_dir is set to something like /tmp or some other directory that the user PHP runs as has access to read and write to. Depending on your environment you can sometimes set that in .htaccess:

php_value upload_tmp_dir /path/to/tmp/dir

Or in a php.ini

upload_tmp_dir = /path/to/tmp/dir

Though if that was the issue, you're probably be having problems uploading photos too.

hmmm, Oh find out what version of ImageMagick is on the server convert -version
____________________________________________
Like Gallery? Like the support? Donate now!

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Tue, 2011-06-07 04:21
Quote:
Since G3 can see and activate IM, there must be some other issue. I think maybe, (hopefully) just a minor one :) If you're familiar with changing some php settings, make sure the upload_tmp_dir is set to something like /tmp or some other directory that the user PHP runs as has access to read and write to. Depending on your environment you can sometimes set that in .htaccess:

php_value upload_tmp_dir /path/to/tmp/dir

Or in a php.ini

upload_tmp_dir = /path/to/tmp/dir

Though if that was the issue, you're probably be having problems uploading photos too.

If there is a problem with a issue above I cant seem to find it...

Quote:
hmmm, Oh find out what version of ImageMagick is on the server convert -version

Well Its not the latest version, 6.4.8 I can have this updated to the latest If you think it may help? I did find some strange behavior with Imagemagick uploading different size photos..
If I upload a typical photo, say 500k I get no thumb , no resize, only a full size , as i checked the thumbs dir and the resize dir, not there, only exists in the full size in the gallery/var/albums/etc..
If i upload a tiny thumbnail size photo say 50k I get a thumb in the thumb dir, a resize and a full size, what would be normal..
Now if i upload a bit bigger file say 90k I get no thumb, but a resize and a full size? I did not go as far as to find out where exactly the sizes are working and at what size things change, if you can take a look at this album:
http://www.armaniphotography.com/gallery/index.php/Download-Your-Purchase

The first photo and the last two are normal size 500k or above, and dont show at all, the two you see thumbs are tiny in size but show thumb, resize and fullsize, and the others where you see nothing but filename, click and you see a resize and full size are between 50k and 100k??
Thanks..
Hope I didnt confuse you!!!
_______________________________________
Like Gallery? Like the support? Donate now!

www.armaniphotography.com/gallery3

 
Graeck

Joined: 2009-07-28
Posts: 22
Posted: Tue, 2011-06-07 16:19

I'm having the same issue. You aren't using Hostm by any chance are you? My uploading stopped working (well I noticed it first) 2 days ago. I haven't changed anything on my end at all. I had a wordpress plugin break at the same time, so I'm pretty sure they changed some php setting (for security reasons) as they've done this before, but I wrote in about it and all that said back was:

"We have not changed any PHP settings over the last 2-3 days. The location of ImageMagick is: /usr/bin/

If your installation of Gallery3 and the WordPress plugin are outdated, we recommend updating to the latest version of each, to see if it helps."

I use the iPhotoToGallery3 plugin and looking at the (error) console it was saying that imagemagic does not exist. So I head into Gallery3 and sure enough, imagagemagick is now disabled with a message saying that it could not be found.

What PHP settings are likely to break this? Anything other than what was mentioned above?

I know I had a problem with the open_basedir setting a while back.

UPDATE: In info.php I see:

Quote:
upload_tmp_dir no value no value

Sounds like that might be an issue.

 
Graeck

Joined: 2009-07-28
Posts: 22
Posted: Tue, 2011-06-07 16:33

It would be great if there were a list of PHP settings that Gallery3 and it's components require to work properly for easy reference. :-D

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Tue, 2011-06-07 18:55

Yes that would be nice as its really hard to get support ... we do have simular issues,but a bit different. I can activate Imagemagick and it goes though the motions of working, puts the full size photo on the server but just the filename on the site and very small images work ok? There are some threads where the open basdir was made restricted by the host and users had to contact them to make it accessable again. If you cant activate Imagemagick, or it keeps deactivating you probably a completly different issue. Hopefully a gallery guru will stop by and give some more insight into this. right now Im using GDlibrary and it works fine, but im limited with file types...

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2011-06-07 20:22
Graeck wrote:
It would be great if there were a list of PHP settings that Gallery3 and it's components require to work properly for easy reference. :-D

You mean like these:
http://codex.gallery2.org/Gallery3:Requirements

Or these (more details)
http://codex.gallery2.org/Gallery3:User_guide:Gallery3:Installing_and_upgrading#Before_you_start_.2F_System_requirements
____________________________________________
Like Gallery? Like the support? Donate now!

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Tue, 2011-06-07 23:40

I did actually read the above more than once, Its the first place I go when I have a problem. Then If I cant find a fix for my perticular problem I seek help from the experts! There may have been the answer to my problem within, but If so It got past me and my limited knowledge.
I dont try to take up anyones time unless its a last resort.. I must have had 50 bugs with gallery 2 and 3, and searching old posts etc.. I was able to fix most of them! when I do have to ask I do know its the only way Im gonna get it taken care of and did all I could on my own..
And I do apreciate the help that is given..
Thanks..

 
Graeck

Joined: 2009-07-28
Posts: 22
Posted: Wed, 2011-06-08 04:32

Thanks nivekiam. I've seen those but they don't discuss the issues with open_basedir and needing to make sure that exec and shell_exec are not listed in disable_functions. There could be more...but I know those have come up a lot, as there are lots of posts about it and I've had issues myself.

I just found out that my web host had re-enabled open_basedir. I've requested that it be disabled. Hopefully that works.

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Wed, 2011-06-08 07:57

quote from the hosts tech... Please check your script settings and make sure the paths are correct. We also recommend that you try to run a conversion command and provide us with the output to check this further for you.

Regards,

Mourad Dmeiri
http://www.arvixe.com
Arvixe, LLC
I already know this is not the problem unless there is some mysterious code telling Imagemagick to not process files over 100k LOL..
Any Ideas ????

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25945
Posted: Thu, 2011-06-09 13:26
Quote:
but they don't discuss the issues......

It is hard to add every tiny requirement as every environment is different. If we added all the things that we have found the requirements would require a book and nobody would read them.
Anyway, I have adjusted some of the wording on that page and feel free to contribute as the docs are for users by users.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Wed, 2011-06-15 08:56

Well I got Imagemagick working , only took a week of hunting down a corruupt file in the database...
I have another bug and was wondering if anyone has a idea on this. When I upload a photo with any browser, the photo uploads the line goes across the upload box , but it sits there for a good 2 mins before it says done? and if i click cancel before the done button is availible the upload is corrupt...
Thanks For all The help ...
Matt
Can anyone give me any idea on this? I have searched but cant seem to find any posts with a simular bug...
bueller, bueller !!! LOL

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2011-06-15 16:53

I don't understand from your description, the problem. Could you post a screenshot?

Wait, after reading it a few times, I think I understand. The file gets uploaded, then processed. It's not saying "done" until the processing is done. I believe the progressbar only shows the upload progress because that's all we can possibly know about. It sounds like your server is over-loaded or under-powered (or both) and it's taking a few minutes to process a single image.

And the 2.3MB file I'm trying to upload is blowing up bigger than my /tmp partition. So I'll have to change that and reboot my server before I test further.

oops, just realized that image I was testing with is huge pixel-wise (7275x10875). After resizing to about half that it, it consumes a lot less memory and after finishing the upload it completes nearly instantly.
____________________________________________
Like Gallery? Like the support? Donate now!

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Wed, 2011-06-15 18:47
nivekiam wrote:
I don't understand from your description, the problem. Could you post a screenshot?

Wait, after reading it a few times, I think I understand. The file gets uploaded, then processed. It's not saying "done" until the processing is done. I believe the progressbar only shows the upload progress because that's all we can possibly know about. It sounds like your server is over-loaded or under-powered (or both) and it's taking a few minutes to process a single image.

Sorry Nivekiam, I guess from mind to keyboard to text = confusion! I would agree with you 100 percent, as this is exactly what happpens, tiny 50kb photo uploads instantly, 1 meg photo long delay.. I dont however think the server is overloaded or under-powered as when i deactivate imagemagick which I have been fighting with for weeks, and activate GDLibrary everyting is normal, I can upload 10 meg photos instantly.. So I do think I am having a problem still with Imagemagick after thinking about what you just wrote, it is having problems processing photos IE making thumbs and resizes, as the red upload bar goes across instantly and should i hit cancel, the full size image is there, only the thumb and resize do not get processed, does IM take more resources then GD ? I thought i had this behind me, guess not? Is there a way to debug whats going on during the upload process?
Thanks..

____________________________________________
Like Gallery? Like the support? Donate now!

www.armaniphotography.com/gallery3

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2011-06-22 06:56

I can only think that if that's the case where GD is working better than ImageMagick that your host has something setup to prevent executables like convert (an ImageMagick tool) from consuming to many resources or possibly there is something in place that is preventing external processes executed by PHP from executing to many resources. Since it sounds like you don't have any problem if you use GD, I'd just continue using that.
____________________________________________
Like Gallery? Like the support? Donate now!

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Wed, 2011-06-22 21:00

Thanks Nivekiam, I am thinking you are correct. just for the heck of it and the fact i like imagemagick over GD im going to do a fresh install in another directory and see how things act.. This is a new host and the import of the database did have some problems....
once I know for sure I will either stick with GD or if things work fine with the new install keep messing around with imagemagick and my current install..
Matt

 
Armani2

Joined: 2007-05-09
Posts: 263
Posted: Thu, 2011-06-23 05:09

Well I did a clean install and still the upload delay exists with imagemagick, so I will just have to live with GDLibrary.
I have one question with imagemagick i changed the .htacess and php.ini to make max upload 100megs the default for the uploader was 25 i believe. with GDLibrary though I have all the setting set for 100meg max , this is for videos, Its is giving me a max of 35megs? If I activate Imagemagick the uploader says and will do 100megs??
Any Ideas?
Thanks..