I have a Droplet running Ubuntu 14.04. I tried to install the GD library using sudo apt-get install php5-gd
and it seemed to install fine. I restarted the Apache2 service, but my image upload script still gives this error:
Call to undefined function imagecreatefrompng()
Are there any additional steps I need to take before the GD library is available to my PHP scripts?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
This question was answered by @jak:
If you’re using a custom php.ini, rather than the default setup, you’ll need to ensure the extension is loaded with a setting like…
extension=gd.so
You can find your php.ini file location that’s in use with a call to php_info()
This comment has been deleted
This comment has been deleted
Click below to sign up and get $100 of credit to try our products over 60 days!
If you’re using a custom php.ini, rather than the default setup, you’ll need to ensure the extension is loaded with a setting like…
You can find your php.ini file location that’s in use with a call to php_info()