Call to undefined function gd_info()

Viewed 3805

When I have activated the theme at local then it is showing me "Call to undefined function gd_info() in /var/www/html/difc/wp-content/themes/grandconference/lib/admin.lib.php on line 283 ". I don't know why this error occurs for the local set-up I have followed below steps:

  1. I have created a local instance of WordPress.
  2. I have uploaded the Grand Conference theme at local.
  3. When I activate the theme, it is showing me above error.

Please guide me if I missed some step, I have followed to installation step from ref:- https://help.market.envato.com/hc/en-us/articles/202821510?_ga=2.35691877.497224052.1498724559-280673764.1489144428 .

When I comment the line 283 in the admin.lib.php file then the theme is working fine for me.

3 Answers

For those which will come to see this question. In addition to installing php-gd, you need to restart the apache and php-fpm, if you have php-fpm installed.

sudo yum install php-gd
sudo service httpd restart
sudo service php-fpm restart

I just wanted to add, for users that use XAMPP like me, the PHP GD library should already come installed. You simply need to enable it.

To enable it, you can open the php.ini file through the XAMPP control panel as shown in the below image.

enter image description here

Once you've opened the .ini file, look for the following line: ;extension=gd. Uncomment this line, save your changes, and restart Apache. After these steps, the error should be resolved.

Related