PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   Error code 1 after server transfer (http://www.photopost.com/forum/photopost-pro-how-do-i/145495-error-code-1-after-server-transfer.html)

jamiedolan March 15th, 2011 04:26 PM

Error code 1 after server transfer
 
Hello;

I moved our site to a new server a few days ago. I just realized I am getting an error code 1 upon image processing. It reports:

Error creating thumbnail! Error code: 1
Command:
"/usr/bin/mogrify" -thumbnail 100x100^ -quality 100 -gravity center -extent 100x100 -unsharp 10 '/home/pawdogs/public_html/photopost/data/1/thumbs/IMG_6567.jpg'

I switched to GD2, it uploaded the image, then came back with this error:
"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12000 bytes) in /home/pawdogs/public_html/photopost/image-inc.php on line 152"

Logged in as the user that this site runs under, I took a test photo and ran it through mogrify on the command line to see if it was working:

pawdogs@pawdogs.com [~/www/photopost/data/1]# ls -la |grep testimage.jpg
-rw-r--r-- 1 pawdogs pawdogs 93568 Mar 15 17:08 testimage.jpg
pawdogs@pawdogs.com [~/www/photopost/data/1]# /usr/bin/mogrify -thumbnail 100x100 -quality 100 -gravity center -extent 100x100 -unsharp 10 /home/pawdogs/public_html/photopost/data/1/testimage.jpg
pawdogs@pawdogs.com [~/www/photopost/data/1]# ls -la |grep testimage.jpg
-rw-r--r-- 1 pawdogs pawdogs 8364 Mar 15 17:08 testimage.jpg
pawdogs@pawdogs.com [~/www/photopost/data/1]#

You can see it must have processed the image, as the size was reduced.

The path to mogrify in the config is:
/usr/bin/mogrify

Checked the server:
pawdogs@pawdogs.com [~/www/photopost/data/1]# which mogrify
/usr/bin/mogrify

Mogrify is set to 766.

Check permissions:
pawdogs@pawdogs.com [~/www/photopost]# ls -la |grep data
drwxrwxrwx 9 pawdogs pawdogs 4096 Feb 18 19:39 data/
pawdogs@pawdogs.com [~/www/photopost]# cd data
pawdogs@pawdogs.com [~/www/photopost/data]# ls -la
total 36
drwxrwxrwx 9 pawdogs pawdogs 4096 Feb 18 19:39 ./
drwxr-xr-x 12 pawdogs pawdogs 4096 Mar 15 16:12 ../
drwxrwxrwx 5 pawdogs pawdogs 4096 Mar 15 17:12 1/
drwxrwxrwx 5 pawdogs pawdogs 4096 Feb 18 18:43 2/
drwxrwxrwx 5 pawdogs pawdogs 4096 Mar 5 21:47 500/
drwxr-xr-x 2 pawdogs pawdogs 4096 Feb 18 18:43 avatars/
-rw-r--r-- 1 pawdogs pawdogs 0 Feb 18 18:43 index.html
drwxrwxrwx 2 pawdogs pawdogs 4096 Feb 18 19:39 medium/
drwxrwxrwx 2 pawdogs pawdogs 4096 Feb 18 19:39 mini/
drwxrwxrwx 2 pawdogs pawdogs 4096 Feb 18 19:39 thumbs/
pawdogs@pawdogs.com [~/www/photopost/data]# cd 1
pawdogs@pawdogs.com [~/www/photopost/data/1]# ls -la
total 34460
drwxrwxrwx 5 pawdogs pawdogs 4096 Mar 15 17:12 ./
drwxrwxrwx 9 pawdogs pawdogs 4096 Feb 18 19:39 ../

drwxrwxrwx 2 pawdogs pawdogs 4096 Mar 5 21:52 medium/
drwxrwxrwx 2 pawdogs pawdogs 4096 Feb 23 15:35 mini/
drwxrwxrwx 2 pawdogs pawdogs 4096 Mar 15 17:12 thumbs/

Permissions and ownership / group all look good on every folder I checked.

ImageMagick was installed via this yum package:
ImageMagick.x86_64 : An X application for displaying and manipulating images.

I'm running out of things to try; I read through old forum posts, I'm not seeing any other ideas.

Thanks.

Chuck S March 15th, 2011 06:17 PM

I would visiting the sticky thread in this very support forum on how to move servers.

jamiedolan March 15th, 2011 07:56 PM

Quote:

Originally Posted by Chuck S (Post 1285683)
I would visiting the sticky thread in this very support forum on how to move servers.

I'm not finding anything in there that I missed. I've rechecked the paths, recheck all of the permissions. I've compared all of the permissions to what was working on the other server and I can't find anything that is different. I've done / re-checked all the other steps, at least twice.

I left Full path to Header Include file / Footer and Full path to HTML file containing head tags, blank. I don't think I was ever using anything in those fields. I also have the watermark field blank, but the watermarks are turned off. Do I need anything in these fields?

I've searched the entire database for the old paths and can't find a single entry.

Any idea what else I can try?

Thanks

Chuck S March 15th, 2011 08:25 PM

well what happens if you set your image processor to GD2?

jamiedolan March 15th, 2011 08:30 PM

Quote:

Originally Posted by Chuck S (Post 1285687)
well what happens if you set your image processor to GD2?

I just switched to GD2 again and tried it and I was able to upload a photo.

Previously when I tried GD2, when uploading an image I was given a PHP error:

"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12000 bytes) in /home/pawdogs/public_html/photopost/image-inc.php on line 152"

Do you think I should compile a new copy of ImageMagick, even though ImageMagick works on the command line?

jamiedolan March 15th, 2011 09:06 PM

I tried uploading and processing a slightly larger image and I got the same PHP error again, with GD2:

"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3000 bytes) in /home/pawdogs/public_html/photopost/image-inc.php on line 152"

Chuck S March 15th, 2011 10:01 PM

You can try the suggestions on the forums here to raise php memory and limit your max image dimensions if you continue using PHP but yes if you want to use imagemagick you can try recompiling a new copy on the server.

jamiedolan March 15th, 2011 11:09 PM

Quote:

Originally Posted by Chuck S (Post 1285694)
You can try the suggestions on the forums here to raise php memory and limit your max image dimensions if you continue using PHP but yes if you want to use imagemagick you can try recompiling a new copy on the server.

Well, no more YUM for me. This is the second time I've struggled for hours to solve a weird problem that magically went away when I downloaded source and compiled it myself (which took a whole 10 minutes).

At least I must have had the other settings and permissions correct, as it all started working as soon as I finished installing the new copy of ImageMagick.

So for anyone else on a Centos box with this issue, just download and compile ImageMagick yourself.

Thanks for the help.

Jamie

Chuck S March 16th, 2011 07:55 AM

Well that error is very detailed here on the forums. It can only be a permissions error which means wrong data server path permissions or imagemagick is broken. You went through all the steps checking path permissions verified uploads work using GD2 so you knew in the end Imagemagick was broken. ;)

jamiedolan March 16th, 2011 02:27 PM

Quote:

Originally Posted by Chuck S (Post 1285705)
imagemagick is broken. You went through all the steps checking path permissions verified uploads work using GD2 so you knew in the end Imagemagick was broken. ;)

I suspected early on, based on what I read here (I did read many threads on the issue) that it was a ImageMagick issue. However, ImageMagick (mogrify) worked to build a thumbnail from the command line; making me think all was well with mogrify.

So for some reason, at least in my situation, having mogrify work from the command line (same command as photopost uses) doesn't mean it will work in a php application. :confused:

Chuck S March 16th, 2011 02:31 PM

well when using it from the command line also always make sure you run the same command that is used in the application as maybe you are using a setting in the program that the version of mogrify on that particular server does not support. That is why recompiling works as well. Like older mogrify installs may not support all the new options.


All times are GMT -5. The time now is 08:41 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97