sql error with big videos 3-5 Gb sql error with big videos 3-5 Gb
 

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

sql error with big videos 3-5 Gb

Started by pfviv, September 01, 2023, 03:29:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pfviv

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


406man

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.

pfviv

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

ron4mac

Quote from: pfviv on September 01, 2023, 01:37:46 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.