Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Cannot upload documents in 1.55.22  (Read 7835 times)

0 Members and 1 Guest are viewing this topic.

drumalone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Cannot upload documents in 1.55.22
« on: May 25, 2013, 10:25:10 pm »

I have installed version 1.5.22 and everything works fine. I can upload pictures in both single and batch methods but cannot upload any document format in single or batch mode. I enter debug mode and get this error...

mySQL error: Incorrect integer value: '' for column 'pwidth' at row 1

I can post the whole error text if that would help.

Any ideas on resolution would be welcome.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Cannot upload documents in 1.55.22
« Reply #1 on: May 28, 2013, 01:25:24 pm »

Please upgrade to cpg1.5.24. If the error still exists there, please follow the upload troubleshooting docs carefully.
Logged

drumalone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Cannot upload documents in 1.55.22
« Reply #2 on: May 28, 2013, 11:50:24 pm »

Thanks, I will upload the latest version.

I have been thru the upload troubleshooting docs but did not find anything talking about just documents as picture uploads work fine. I tried changing the mode but that had no effect.

If the version update does not work I will post a user account for access to check things out.
 
Logged

drumalone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Cannot upload documents in 1.55.22
« Reply #3 on: May 30, 2013, 12:32:37 am »

I uploaded v. 1.5.24 and installed. Everything works fine except I still cannot upload any document formats. Pictures upload without problem. I have gone thru the upload troubleshooting doc. and am still no closer to resolving this issue.

Anyone who would take a look here is the info...

The gallery address is www.lightwaveglassstudio.com/coppermine/

User is - test user
password - opendoor
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Cannot upload documents in 1.55.22
« Reply #4 on: May 30, 2013, 09:39:45 am »

Please enable debug mode for everyone. I just tested with a PDF file but got just the generic error message.
Logged

drumalone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Cannot upload documents in 1.55.22
« Reply #5 on: May 30, 2013, 09:32:42 pm »

Debug is enabled for everyone. Sorry I had it on but just for admin.
Logged

drumalone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Cannot upload documents in 1.55.22
« Reply #6 on: June 17, 2013, 05:19:57 am »

I have noticed that coppermine is uploading documents onto the server even though it looks like the document uploads are failing. The problem seems to be that coppermine cannot find or display them once uploaded. The docs are in albums/userpics along with pictures that do display in the gallery. The docs are in allowable formats.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Cannot upload documents in 1.55.22
« Reply #7 on: August 19, 2013, 05:18:50 pm »

I just tested again to upload a PDF file and got this error message:
Quote
While executing query 'INSERT INTO cpg15x_pictures (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position, guest_token) VALUES ('13', 'userpics/10004/', 'DNStunnel_de_-_free_DNS_tunneling_service~0.pdf', '170291', '170291', '', '', '1376925339', '4', 'Test by André', '', '', 'YES', '', '', '', '', '195.126.85.201', '195.126.85.201', '0', '')' in include\picmgmt.inc.php on line 173

mySQL error: Incorrect integer value: '' for column 'pwidth' at row 1

Please check the default value for "pwidth" and "pheight" in your MySQL database. If there's no default value, set it to "0".
Logged

drumalone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Cannot upload documents in 1.55.22
« Reply #8 on: October 19, 2013, 10:28:51 pm »

It appears that the default value for pwidth an pheight are set to "0" already.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Cannot upload documents in 1.55.22
« Reply #9 on: October 31, 2013, 10:53:38 am »

I just had a closer look at the add_picture function.

This is the query:
Quote
$query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position, guest_token) VALUES ('{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '', '', '', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}', '{$CURRENT_PIC_DATA['guest_token']}')";

The values $CURRENT_PIC_DATA['pwidth'] and $CURRENT_PIC_DATA['pwidth'] are set here:
Code: [Select]
    $CURRENT_PIC_DATA['pwidth'] = $imagesize[0];
    $CURRENT_PIC_DATA['pheight'] = $imagesize[1];

The values $imagesize[0] and $imagesize[1] are set here:
Code: [Select]
        $imagesize[0] = $iwidth;
        $imagesize[1] = $iheight;
which both defaults to "0", as you can see here:
Quote
function add_picture($aid, $filepath, $filename, $position = 0, $title = '', $caption = '', $keywords = '', $user1 = '', $user2 = '', $user3 = '', $user4 = '', $category = 0, $raw_ip = '', $hdr_ip = '', $iwidth = 0, $iheight = 0)

But for some reason your query contains empty values for width and height:
Quote
INSERT INTO cpg15x_pictures (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position, guest_token) VALUES ('13', 'userpics/10004/', 'DNStunnel_de_-_free_DNS_tunneling_service~0.pdf', '170291', '170291', '', '', '1376925339', '4', 'Test by André', '', '', 'YES', '', '', '', '', '195.126.85.201', '195.126.85.201', '0', '')

Please attach the file include/picmgmt.inc.php as zip file to your next reply.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 21 queries.