Podcast generator / getid3 issue with php 7.1

Yesterday my belowed Podcast generator (where I'm hosting private audio recordings to listen to conveniently) had an issue. After uploading an episode its web interface was stuck at a blank white page and the episode was never added (though the file was actually uploaded).


After looking into nginx's error logs (nano /var/log/nginx/error.log on Ubuntu) I found this PHP Error:
Fatal error: Uncaught Error: [] operator not supported for strings in getid3/module.audio.mp3.php(1088): getid3_mp3->decodeMPEGaudioHeader

Previously, running all the same on PHP 7.0 had no issues whatsoever. But when I moved the podcast generator to another server, it had PHP 7.1 and that what caused the issue.

Thankfully I was able to overcome it by updating all the files in the getid3/ folder of the web app with a newer version of getid3 (responsible for generating id3 tags from audiofiles). So if you have the problem with podcast generator or getid3 in any other app, now you know how to fix it 🙂

How to increase upload file size limit

I'm using a self-hosted podcast web app (PodcastGenerator) to serve and listen audiobooks in Overcast with Smart Speed and position tracking. In order to get new books in my podcast feed I upload them via the built-in web admin panel. But since the audiobook files can be as large as 200-300MB, uploading them via a browser hits the default upload file limit of both Nginx (my http server) and PHP (which my podcast web app uses) pretty soon.


In order to increase the upload file size limit, do this:

  1. Edit Nginx's config
    sudo nano /etc/nginx/nginx.conf
    and add client_max_body_size 2000M; into the 'http' block
    Save and exit

  2. Edit php's config
    sudo nano /etc/php/7.1/fpm/php.ini (or track down your php.ini file by creating a *.php file with contents and run it)
    Find and change upload_max_filesize and post_max_size as well to = 2000M

  3. Finally restart Nginx (or your http server) via
    service nginx reload
    and also you can restart php to be safe via
    service php7.0-fpm restart

All my commands are meant for Ubuntu I'm running, for your OS you'll have use your own alternatives.

Happy uploading! 🙂