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: sql error with big videos 3-5 Gb  (Read 2919 times)

0 Members and 1 Guest are viewing this topic.

pfviv

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
sql error with big videos 3-5 Gb
« on: September 01, 2023, 03:29:02 am »

Hi.

Coppermine v1.6.25
MariaDB version 10.5.16

Primary files is mp4 video from GoPro and Mavic drone
I have set coppermine and PHP 5Gb. I can upload files up to 2Gb,  Files larger the 2Gb and I get an error from Mysql:

While executing query 'INSERT INTO cpg16x_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 ('2', 'userpics/10001/2/', 'GOPR0007.MP4', '2705177846', '2705177846', '0', '0', '1693507715', '1', '', '', '', 'YES', '', '', '', '', '', '', '0', '')' in include/picmgmt.inc.php on line 184

database error: 1264 : Out of range value for column 'filesize' at row 1.

Is it possible to change something in the sql database?

Tanks
Ivan

Logged

406man

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: sql error with big videos 3-5 Gb
« Reply #1 on: September 01, 2023, 12:49:56 pm »

As described in the error message, the problem is that the number representing the size of the video file is bigger than what can be stored in the filesize field in the database.  It is an INT data type which you can read about here:
https://www.w3schools.com/sql/sql_datatypes.asp
While in theory you could change the column in the database to a BIGINT  which can hold a much larger number, there might also be changes to needed to Coppermine’s PHP code. The Coppermine developers are better placed to say what would be involved in making a change like this but I doubt it’s straightforward.

In the short term you would probably be better off considering other approaches which involve making the video file size smaller. For example, breaking into multiple sections, decreasing the frame rate or the frame size. Any changes like this would have the advantage of making the video faster to download and take up less storage space.
Logged

pfviv

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: sql error with big videos 3-5 Gb
« Reply #2 on: September 01, 2023, 01:37:46 pm »

Hi.

Tanks for the replay.

I will set up an test server and see if I change to BigInit will work
If not we have to set max size to 2Gb :-)
Could the Coppermine developers confirm if it will work with BigInit?

Ivan
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: sql error with big videos 3-5 Gb
« Reply #3 on: September 01, 2023, 03:39:54 pm »

Could the Coppermine developers confirm if it will work with BigInit?
Without actually testing, I believe that as long as you are running CPG on a 64 bit OS, it should be okay.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.