PDA

View Full Version : cannot re-upload images


SnowScan
08-01-2006, 07:08 PM
I have the problem that I cannot re-upload images.

If I manually name the a picture the same as an existing and upload via FTP and overwrite the existing however I cannot use the re-upload feature from admin.

Have anyone experienced this before? as you can see the directory is CHMOD'ed correctly.

any ideas?



Installation information:

You are running Pixelpost version: 1.5 Final - July 2006
Latest Pixelpost version: Check

Looking for help or want to give feedback, please step into Pixelpost forum.: www.pixelpost.org/forum/

Host Information

URL http://www.snowscan.org/admin/index.php

PHP-version 4.4.2 (Pixelpost's min requirement: PHP version: 4.3.0 )

Session save path /tmp

MySQL version 4.1.19-standard (Pixelpost's min requirement: MySQL: 3.23.58 )

GD-lib bundled (2.0.28 compatible) with JPEG support

File Uploads to Pixelpost site are possible.

Server Software Apache/1.3.36 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7a

EXIF Pixelpost is using exifer v1.5 for EXIF-information.

Paths
Guessed imagepath: /home/hestbae/public_html/pixelpost/images/

Configured Imagepath: /home/hestbae/public_html/pixelpost/images/

Image Directory: OK - Can we write to the directory? YES. CHMOD: 0777

Thumbnails Directory: OK - Can we write to the directory? YES. CHMOD: 0777

Language Directory: OK

Addons Directory: OK

Includes Directory: OK

Templates Directory: OK

Vernon.Trent
08-01-2006, 07:38 PM
if you need to re-upload an image do it. choose the new image and re-upload.
you don't have to rename it before. that's the way I'm doing and it works.
if the reuploded looks different, you will have to recreate the thumbnail as well.
go after reuploading to 12crop and create the new thumbnail.

SnowScan
08-01-2006, 07:42 PM
the problem is that I cannot use the re-upload feature, it does not excange the the picture as it should.
(the only way I can re-upload is manually via FTP)

Sorry if I did not make myself clear

GeoS
08-01-2006, 09:43 PM
What CHMOD do have image files which are already in /images??

SnowScan
08-02-2006, 06:23 AM
PP CHMOD them 644

GeoS
08-02-2006, 08:05 AM
So try to set them to 666 :P

SnowScan
08-03-2006, 01:19 PM
When I try nothing happens, I get the following error (using filezilla)

Command: SITE CHMOD 666 /public_html/pixelpost/images/img_5873_700_colour.jpg
Response: 550 Could not change perms on /public_html/pixelpost/images/img_5873_700_colour.jpg: Bad file descriptor

I should add that I do not have problems changing permissions elsewhere in the system/folders.

Perhaps PP wrongly set the file permission to 644?

SnowScan
08-03-2006, 01:27 PM
I fond this code

Line 185 in admin/new_image.php
if(move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
chmod($uploadfile, 0644);

Line 85 in admin/images_edit.php
if(move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
chmod($uploadfile, 0644);

Perhaps 644 should be changed to 666?

Connie
08-03-2006, 01:52 PM
I am sure it is not wrong to have 644, because thousands of installations work with that permission ;=)

GeoS
08-03-2006, 07:31 PM
I am sure it is not wrong to have 644, because thousands of installations work with that permission ;=)

Thouusands doesnt mean all.

After developing "few" websites I know it quite good. Small difference in settings under same OS can completly change way how it is working.

First try then think why it works and didnt before :P

Going back to problem I think that images are uploaded by other user then files uploaded by you using FTP. For images it can be Apache/www/nobody or any other user. Solution can be easy - download image on which you want operate to local machine then delete it on remote one and reupload it with chmod 666. It should help.

SnowScan
08-03-2006, 09:03 PM
Hi GeoS,

I downloaded all images deleted them from the server, uploaded them again - and now it is possible to change permissions.
thanks for the help.

I tried uploading a new image and now it chmods it correctly 666 (I made the changes as proposed earlier to the admin files)

However I still cannot re-upload an image...

GeoS
08-03-2006, 09:45 PM
That is strange you cant upload:/ Does Pixelpost show any error?

PS As last attempt to chmod you can try to set it to 777 and then check if it is possible to reupload images.

vxt
08-05-2006, 11:13 PM
Well pixelpost installation doc says /images and /thumbnails must be 777. so try that.

SnowScan
08-06-2006, 01:46 PM
Thanks for all your advices and suggestions, but it still does not work...

I have now chmod'ed all images/thumbnails to 777 (only possible after dowloading them, deleting the orginals and uploading them again via FTP)
However when I upload a new image it is chmod'ed 644 and it is not possible for me to change the image (re-upload).
PP does not give any error, actually it gives a success statement (image #XXX edited)

Connie
08-06-2006, 02:12 PM
did you ever contacted your hoster?

Sometimes the script is installed with other user than the actual

we can only assume something
your hoster's techstaff is paid for assistance

give them a chance, let them find out ;=)

GeoS
08-06-2006, 03:40 PM
Problem of chmod is easy - webserver on your box saves files to your account as own not as yours (in meaning of user used for it). This is issue.