I have updated the php version of my dedicated server to 8.1.4 and now the imagecreatefromjpeg function doesn't work anymore. I have enabled GD extension in php.ini, I have run sudo apt-get install php8.1-gd and restarted apache.
When I run php -i | grep -i gd I get this:
GD Support => enabled
GD headers Version => 2.2.5
GD library Version => 2.2.5
gd.jpeg_ignore_warning => 1 => 1
The code that is being ran and has previously worked with php 7:
$source = imagecreatefromjpeg($filename);
For me everything is correctly configured, there is no reason why php should not recognize the function.
I would be really grateful if somebody could help to solve this problem.
If perhaps you are using xampp or wampp, find your
php.inifile,then edit this
to this.
there you have it. to find the
php.inifile open your xampp control panel, click on apache config, then select php.ini,open it the hold ctrl-f then search for gd, then you find the extension then remove the semi-colon at the beginning of the line.