Hello. I am trying to use some large videos (~5-10gb) in my CPG installation. I upload them via FTP, and I'm trying to add them through
Batch Add Files, but the system chokes with the error...
Fatal error: Maximum execution time of 30 seconds exceeded in /home/xxxMyCpgDirectoryxxx/include/functions.inc.php on line 5459
It does this regardless of if I use
Browsable interface, or
Display preview thumbnails. I get the error no matter what.
Now, I'm no web developer, but I cracked open functions.inc.php and checked out line 5459. It reads...
$size = getimagesize($image);
It seems that it's trying to crack open these massive files and determine their dimensions. I suspect, even if it were successful in churning through the whole file, it likely wouldn't be able to pull out actual dimensions anyway, as I assume it's expecting an image, not a video.
On a hunch, I modified line 5396 from...
function cpg_getimagesize($image, $force_cpg_function = false)
...to...
function cpg_getimagesize($image, $force_cpg_function = true)
Tada! The Batch Add Files page loads great and allows me to select and add my large video files. ...however, now any images within the gallery are misshaped, so obviously this isn't really a fix.
Again, I'm not web developer, and I'm hardly able to pick apart the PHP, but it seems like the function, or whatever is calling the function, ought to first check the file extension of the file it's looking at. If that extension is registered as a video clip, it should just skip over this step, cause it's likely not going to get any useful information anyway (maybe I'm wrong?).
Like I said, I don't really know what I'm talking about here, so I of course defer to the
actual CPG developers regarding what a fix ought to be, but I at least wanted to bring the issue up. It would be great if I could Batch Add these large videos.
Thanks in advance for your help.
-= Brandon.