Enabling/installing GD extension? --without-gd

后端 未结 9 750
刺人心
刺人心 2020-12-28 11:58

How does one enable (or perhaps I need to install) GD when my phpinfo() output in \"Configure Command\" says; --without-gd ?

I also have nothing in my phpinfo() outp

相关标签:
9条回答
  • 2020-12-28 12:20

    In CentOS (but the same may apply to other distros too) if you install the php7x-gd module followed by Apache restart and still the php -i does not show the GD Support => enabled it might mean that the php.ini was not automatically configured to support this extension.

    All you have to to is either to edit the /etc/php/php.ini or to create a /etc/php.d/gd.ini file with the following content:

    [gd]
    extension=/path/to/gd.so # use the gd.so absolute path here
    
    0 讨论(0)
  • 2020-12-28 12:21

    I've PHP 7.3 and Nginx 1.14 on Ubuntu 18.

    # it installs php7.3-gd for the moment
    # and restarts PHP 7.3 FastCGI Process Manager: php-fpm7.3.
    sudo apt-get install php-gd
    
    # after I've restarted Nginx
    sudo /etc/init.d/nginx restart
    

    Works!

    0 讨论(0)
  • 2020-12-28 12:29

    For php7.1 do:

    sudo apt-get install php7.1-gd
    

    and restart webserver. For apache do

    sudo service apache2 restart
    
    0 讨论(0)
提交回复
热议问题