replace picture plug-in replace picture plug-in
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

replace picture plug-in

Started by chkla, September 16, 2010, 01:24:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chkla

After upgrading to cpg 1.5.8. I did also an upgrade voor file replacer plug-in.
However it looks if it works, ( I see at least no error messages) but afterwards the file isn't replaced.

Αndré

Clear your cache. The plugin works for me as expected.

chkla

Sorry, but it still doesn't work.
I have even removed the plugin completely, downloaded anew and installed it again.
I have set debugging on. No error messages, but the picture isn't replaced.

Αndré

Post a link to your gallery and a test account which is allowed to upload pictures and use the plugin.

chkla

André I made a test account and an album:


http://nngfotoalbum.west-papua.nl/index.php?cat=10016
un: andre
pw: test!@#$

Category: Albums van leden
Album: andretest, with 5 pictures in it.


chkla

I saw an upload, but nothing further.
No solutions?

Αndré

I assume the error occurs here:
Code (codebase.php) Select
move_uploaded_file($fileupload['tmp_name'], $image);

Please replace that line in codebase.php with the following code:
            if (!move_uploaded_file($fileupload['tmp_name'], $image)) {
                cpg_die(ERROR, 'There was an error moving the file \''.$fileupload['tmp_name'].'\' to its destination \''.$image.'\'', __FILE__, __LINE__);
            }

chkla

I replaced the code and got the following error

Fout
There was an error moving the file 'C:WindowsTempphp8548.tmp' to its destination 'albums/userpics/10016/DSC07162.jpg'


I checked the rights on this map and changed it into full for all groups except for public users (windows).
However I still got the same errormessage.

Αndré

Please have a look at the error message:
QuoteThere was an error moving the file 'C:WindowsTempphp8548.tmp' to its destination 'albums/userpics/10016/DSC07162.jpg'

That path is invalid. I'll have a look at the code soon.

chkla


Αndré

Sorry I lost sight of this topic. I just tested again on my Windows testbed running the Apache webserver. Works as expected. I currently don't know why it happens for you and am stuck. Maybe you can tell us a little bit more about your server setup?

chkla

Andre I can give you the following serverinformation:
windows 2008 SP2
windows firewall SP2
IIS7
PHP 4.4.7
MySQL 5.0.22 local

I tried to replace two pictures this morning:
the first one was in your album and originate in an userpic album. I tried to replace with a picture with a different name. Didn't work, so I thought maybe the rights are a problem
therefore I took another one in a dedicated album. Replace with a picture with exactly the same name didn't work either

I send you as an attachment a part of the logfiles. (It's a pity I can't upload in xls. Gives a better overview.)
Hope you can find something out.

Regards Chris

Αndré

As already said before, the cause is that all backslashes are stripped from your uploaded file path
QuoteC:WindowsTempphp8548.tmp

Please test if HTTP upload works for you in general. If you can, please also test if an upgrade to PHP5 fixes the issue. Also make sure none of Coppermine's files has been corrupted.

Αndré

Please test version 1.6 of the plugin and report if it works now.

chkla

André thanx. I installed version 1.6 and it works ok now.