View Full Version : Error creating thumbnail! Error code: 1
December 4th, 2006, 03:35 AM
I am trying to create a function to automate adding my existing content into photopost. i added a function to adm-misc.php.
it calls the create_thumb() function. i get this error
Error creating thumbnail! Error code: 1
"/usr/bin/mogrify" -strip -resize "120x" -resize "x78<" -gravity center -crop 120x78+0+0 -quality 70 -unsharp 10 '/home/content/a/l/l/allfansites/html/photopost/data/959/thumbs/1.jpg'
i copy my images to my uploaddir which is /photopost/uploads/4 before i try to add them to the specific category.
December 4th, 2006, 10:39 AM
The reason that lead to this problem is here:
The reason for this error particular error above was that I forgot to add a trailing slash to that path.
1) please fix that 208 problem
2) add a check when saving config settings using adm-config.php that checks that those paths that need to have a trailing slash do have that and if they don't it will be added manually.
December 4th, 2006, 03:21 PM
this path looks right to me
does error code 1 mean mogrify could not find the file?
December 4th, 2006, 05:09 PM
Try setting your processor to gd2 and try although I would think first you need to ensure data directory permissions are 777 every level down in there
December 4th, 2006, 05:49 PM
it works if i upload the images to my uploaddirectory and tell photopost to process them.
but if i call the createthumb() function from my code it fails.
December 4th, 2006, 08:01 PM
Are your permissions correct? Does gd2 work? I do not see an answer to my question thanks.
December 4th, 2006, 10:52 PM
the permissions are all 777 in the data folder and the subfolders.
i switched from imagemagick to gd1 and its working again.
thank you very much.
February 7th, 2007, 12:45 PM
This was caused for me, by moving the data folder and letting PP rebuild the folder. There were some categories with no images in, so it didn't create the 'medium' and 'thumb' directories. Then when I tried to upload a new pic, it came up with that error.. Its a bug that needs fixing.
(running the latest version btw)
February 7th, 2007, 12:56 PM
?? I am not sure what you mean by moving the folder and rebuilding it. Your data folder has to be 777 at every level.
There is no bug we can see here. If you have a category in your categories table way back in the 4.85/4.86 upgrade we scanned the categories table and added thumbs mini and medium folders and chmod them to 777 so on a normal Photopost install they would exist. New categories are created with those folders in them so how your missing them would seem to be in how your moving things etc. Your fix would be to verify what you did and check each data folder and make sure the proper subdirectories exist and are 777.
Also we can not support any alterations you have made to the code so check your own code to ensure you have not altered something that could cause this issue as well.
May 14th, 2010, 02:59 PM
Chuck, I'm getting similar errors on rebuilding medium images, after moving my functioning photopost to a new server.
Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/xxxxx/public_html/photo/data/512/medium/1stoneforest__22_.JPG' for writing: Permission denied in /home/xxxxxx/public_html/photo/image-inc.php on line 159
Everything is chmod'ed 777 in the data directory, even the 1, 2, 5xx directories, and all of their individual directories in each of those folders (that took some time). Any idea why I continue to get these errors? Photopost seems to be working fine other than that.
May 14th, 2010, 04:12 PM
Make sure you server path is correct and physically check that the /data/512/medium directory exists and is 777
That error suggests it is wrong or maybe that specific image is corrupt.
May 14th, 2010, 05:28 PM
Thanks Chuck. Directories are there, chmod'ed correctly, I get a lot of these errors. Could it have something to do with the way the file is numbered, with the "underscores"? Does this just pertain to the medium images, ie, I don't notice anything wrong with the forum.
Funny, this started happening after I moved from one server to another. The original photopost (on russbo.org, which will be taken down once I get this thing ironed out), works fine.
May 15th, 2010, 06:22 AM
well if it started happening after a server move I would suspect that the file is correct or simply MISSING as in was never grabbed from the old server.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.