crop and rotate - save error why? crop and rotate - save error why?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

crop and rotate - save error why?

Started by Skipper, September 26, 2004, 09:40:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skipper

When someone clicks "crop and rotate" on the preview a pic bit, and then clicks save pic, they get the following error. Is it because of the CHMOD needs setting to 777 on that file?

Or another reason? Anyway, here's the error:

QuoteWarning: copy(albums/1 Police/01010048.jpg): failed to open stream: Permission denied in /home/emergen/public_html/gallery/picEditor.php on line 159

Thanks.

P.S I'm using theme project vii. Thanks

Casper

There could be several reasons.  First, you should avoid using spaces in your directory names on the server.

You will need to provide more info for us to be able to help.

Turn on debug mode, and post here the output when this occurs.  provide a test user account, with log on and upload permissions.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Skipper

Notice: Undefined variable: img_dir in /home/emergen/public_html/gallery/picEditor.php on line 119

Notice: Undefined index: id in /home/emergen/public_html/gallery/picEditor.php on line 122

Warning: copy(albums/1 Police/01010048.jpg): failed to open stream: Permission denied in /home/emergen/public_html/gallery/picEditor.php on line 159

Here is the output in debug mode.

I have sent you a personal message with the details for admin. Thanks

Casper

Please do not send pms to members of the dev team, unless they ask for it.  In this case, it was needed, but that was not clear from your post.

Quote from: Skipper on September 26, 2004, 09:40:20 PM
When someone clicks "crop and rotate" on the preview a pic bit, and then clicks save pic, they get the following error

This sounds like you have users doing this.  As there are no user galleries, and users cannot do this action in the public albums, even to their own pics, this must be when you are doing it, as admin, unless you have applied a mod.

I uploaded a pic into a test album, viewable only to admin.  I then cropped, and rotated, without any errors.  please read my pic info before you delete this file and album  ;)

If you are still having this problem, please give a deep link to a pic this happens with.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Skipper

Sorry I didn't want to post access to my admin on a public forum (which I'm sure you would have said if i did, so I used my common sense).

Anyway, to be honest I did only try it on one image and It didn't work. It was this picture:

http://www.emergencyvehicles.org.uk/gallery/picEditor.php?id=1

and I've just tried it on this one too, and it still does not work:

http://www.emergencyvehicles.org.uk/gallery/albums/edit/01010070.jpg?1401023076

Use the same admin access as usual if you need to.

Thanks a lot.

Skipper

Nibbler

Your problem could well be related to the size of the pic, the one you posted is over 4 times the size of my screen.

Also why have you uploaded into /edit ? That's just asking for trouble...

Skipper

Quote from: Nibbler on September 28, 2004, 12:55:28 PM
Your problem could well be related to the size of the pic, the one you posted is over 4 times the size of my screen.

Also why have you uploaded into /edit ? That's just asking for trouble...

I've just looked in the /edit folder and there are only 2 pics there. God only nows how they were uploaded into there, because I didn't do it...or atleast I don't think i did.

I've never thought about the size of the pic being the problem. Maybe it is. But a lot of the pictures are that size (well a bit smaller - that's a one off) anyway. I'd have to do a lot or editing. Can you set upload permissions for stting the max size of a pic? What size do you suggest I set it to?

thanks.

Skipper

Casper

You can rotate the large images, but it is the image size that's causing the problem with the crop.  It is able to do the thumb and normal pics, but not the full size.

But when you do a smaller pic, such as the one I uploaded, it works fine.

I would suggest you ask your users to re-size their images before upload, to a maximum of 1000 px.  If your users, like mine, had problems with this, a little tutorial on how to use Irfanview might help.  It certainly did with my users.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Skipper

ok thanks for your help. I'll get something sorted.

Skipper

One last thing...

When you say ask visitors to upload images no bigger then 1000 pixels, do you mean put a restriction on the upload size.

Do you also mean 1000x1000 pixels? Can you also restrict upload file size? If so, what size wouild you suggest for a site like mine, as i'm not too sure.

Many thanks.

Casper

The setting in config would be 1000, so yes, 1000 x 1000 would be the max.
The file size is actually less important in this issue than the pixel size.  A 1600 x 1200 pic saved at 100kb may fail, where the same pic, saved at 800 x 600, but at better quality and at 1mb may succeed, on the same server.

It depends on your server settings, as to max memory allowed for the action, and max post size, but your best bet would be to do a bit of testing, say starting at 1200 x 800, and see what size always works.

Then set that as your site max.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Skipper

ok thanks for your help. I'll do a bit of fiddling.