jreklund / php4dvd

php4dvd is an open source php/mysql powered movie database. Catalog your video collection with ease. Automatic update of information and images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal error when adding movie from IMDB on PHP 8.1

enikao opened this issue · comments

When trying to add a movie with PHP 8.1, I get the following error:

PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function Imdb\\parse_ini_file() in php4dvd/lib/imdbphp/src/Imdb/Config.php:189
Stack trace:
#0 php4dvd/includes/movie.update.inc.php(24): Imdb\\Config->__construct()
#1 php4dvd/index.php(135): require_once('...')
#2 {main}\n  thrown in php4dvd/lib/imdbphp/src/Imdb/Config.php on line 189'

I wasn't able to replicate this on PHP 7.4 to PHP 8.1. parse_ini_file are built into PHP itself. Have you made any custom configurations to php4dvd?

I tested with Ubuntu 22.04.01 and haven't hade any custom configurations to PHP or php4dvd. Here are the packages I installed:

sudo add-apt-repository ppa:ondrej/php
sudo apt update -y
sudo apt install php8.1-common php8.1-fpm php8.1-gd php8.1-mysql php8.1-mbstring php8.1-intl php8.1-xml php8.1-curl

You're right, parse_ini_file is in my disable_functions config. I forgot this is possible in PHP.