I can’t even post videos on here
So yesterday and this morning I took a whack at allowing video attachments on posts on the forum. The short story is that I don't think we are going to be able to do it and pasting YouTube links will be the best way to go. Storage space isn't too expensive through Amazon S3 but there are some limitations between this forum software and the CDN we use.
Warning: The long version of how I arrived at this decision is VERY long. Proceed at your own risk.
The long story is that the forum, website and I had a good fight yesterday. Here's the timeline of how that went.
(Side note, I am able to do the regular website development on a local site and then a test site online before pushing live so the public rarely sees all of my mistakes. However, I haven't figured out how to do the same with this forum software. That means you guys might notice the forum sputter and or crash entirely while I'm pretending like I know what I'm doing and trying to make changes):
The following times are approximate.
3:30 PM, March 4
I made a copy of the forum database so that if everything crashed and burned, we would still have the content that you all have built. I placed this backup at the root of the server so that I wouldn't overwrite it while updating the forum. I considered downloading the data to my shop computer but for some reason downloading the 3.5 GB of forum data was going to take 5 hours.
(Side note: The whole server including the regular website, forum, forum database and the entire file system is backed up every 7 days but I did a backup of just the forum database so we wouldn't lose what wasn't backed up in the scheduled backup)
3:45 PM
I downloaded and extracted the forum update on my shop computer. I pushed the files to the server and went to the page that starts the installer. I received a warning that the version of PHP I was running was old and needed to be updated for the newest version of the forum. At this point in time the website still worked but the forum didn't because of the PHP error.
4:15 PM
I downloaded and installed the newest stable version of PHP to the server. When I went back to the forum installer, it still had the warning that PHP needed to be updated. I checked inside the server terminal for the PHP version and it reported that the newest version of PHP was running but the forum installer reported otherwise. I found a way to ping DFKitCar.com from the terminal and it reported that the old version was still in use. I thought that was weird and wondered if maybe the old version of PHP needed to be completely removed from the server. So I did that.
4:30 PM
The entire DFKitCar.com site (not just the forum) went down. You couldn't access anything.
4:30 PM to about 7:00 PM
I poured through a million different articles, threads and videos trying to figure out what I had done and how to fix it. I went through the different levels of the server to check at each step if everything was working as it should be. From within the terminal, it looked like everything was good but online nothing was being delivered to the browser.
At this point you might be thinking "Adam, you backed up the forum, why don't you just restore that backup?" Well, the problem was that the PHP error was on the server so restoring the forum would only restore the forum data. It wouldn't fix anything on the server.
I wasn't too concerned about the website being completely gone because I do have the full backups of the server. I could restore the most recent backup and we'd be back on the old PHP version and everything would work. The only problem was the most recent backup of the full server was 6 days ago. So the forum data (posts, images, new members) from the last 6 days would be gone. I would first have to download the forum database backup I had recently made so that it wouldn't be overwritten when the server was restored to the old backup.
If I couldn't fix the forum by bedtime I was going to start the 5 hour download and then set an alarm to wake me up and fix it when the download finished.
Luckily, it didn't come down to that. After hours of searching articles online I finally found the one that had the tiny piece of information I needed. It had to do with the way PHP works on nginx and how there is a line in the configuration that has to be manually changed to point to the new version of PHP
for every site you have in sites-enabled and not just the default file. Once I updated the configuration there, everything started working again.
This morning
I set out to enable video uploads for certain member groups (not for newbies). First I needed to make sure they would work. I enabled them just for myself and gave it a shot. I had to change PHP and nginx settings to allow uploads over 5mb I bumped it up to 5gb and started uploading videos. I quickly found out that it would work up to 100mb videos. Larger than that and it complained.
I went through all the settings again and again. Nothing would remove the 100mb limit. I finally found a forum where someone mentioned that the CDN we use (Cloudflare) limits single file uploads to 100mb (unless you pay more and even then you don't get a lot more). I could unlock this limit by disabling CloudFlare.
I'm not willing to disable CloudFlare. It contributes to our website being snappier because instead of everyone connecting directly to our little server, our files are served from the CloudFlare server that is closest to you. It takes the strain off of our server and decreases your load times.
Even if we didn't have the limit from CloudFlare, the next problem is the way our forum software handles large uploads. Instead of breaking the upload up into chunks and smoothly handling patchy internet service, it uploads it all as one big chunk. If you leave the tab or your phone goes to sleep or your connection is interrupted, the upload fails.
I don't blame the forum developers for this problem. YouTube, Facebook, Instagram and other big companies put a ton of time and money into making video uploads work so well. The forum guys are focused on other tasks.
Conclusion
I won't be enabling videos for anyone. We're going to stick to relying on YouTube for videos. I wish there was a way to integrate the YouTube uploader into the "Attach Files" tool but I haven't seen a way to do that.