Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: replace picture plug-in  (Read 6617 times)

0 Members and 1 Guest are viewing this topic.

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
replace picture plug-in
« on: September 16, 2010, 01:24:44 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: replace picture plug-in
« Reply #1 on: September 16, 2010, 02:40:38 pm »

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

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: replace picture plug-in
« Reply #2 on: September 17, 2010, 01:16:43 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: replace picture plug-in
« Reply #3 on: September 17, 2010, 01:37:55 pm »

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

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: replace picture plug-in
« Reply #4 on: September 19, 2010, 02:19:15 pm »

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.

Logged

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: replace picture plug-in
« Reply #5 on: September 30, 2010, 01:33:01 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: replace picture plug-in
« Reply #6 on: September 30, 2010, 01:58:03 pm »

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:
Code: [Select]
            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__);
            }
Logged

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: replace picture plug-in
« Reply #7 on: October 01, 2010, 05:16:29 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: replace picture plug-in
« Reply #8 on: October 01, 2010, 06:06:32 pm »

Please have a look at the error message:
Quote
There 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.
Logged

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: replace picture plug-in
« Reply #9 on: November 18, 2010, 07:36:55 pm »

Andre any news??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: replace picture plug-in
« Reply #10 on: November 18, 2010, 08:11:52 pm »

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?
Logged

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: replace picture plug-in
« Reply #11 on: November 20, 2010, 07:29:14 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: replace picture plug-in
« Reply #12 on: November 20, 2010, 08:49:03 am »

As already said before, the cause is that all backslashes are stripped from your uploaded file path
Quote
C: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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: replace picture plug-in
« Reply #13 on: December 23, 2010, 03:50:56 pm »

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

chkla

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: replace picture plug-in
« Reply #14 on: December 30, 2010, 08:32:02 am »

André thanx. I installed version 1.6 and it works ok now.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.