У меня установлен и включен PHP GD:
sudo gedit /etc/php/7.0/apache2/php.ini
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
Но я не могу найти его на экране phpinfo();
и не могу найти его с помощью приведенного ниже кода:
if (extension_loaded('gd') && function_exists('gd_info')) {
echo "PHP GD library is installed on your web server";
}
else {
echo "PHP GD library is NOT installed on your web server";
}
Результат: Библиотека PHP GD НЕ установлена на вашем веб-сервере
Я нахожусь на PHP 7.0:
$ php -v
PHP 7.0.22-0ubuntu0.17.04.1 (cli) (built: Aug 8 2017 22:03:30) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.22-0ubuntu0.17.04.1, Copyright (c) 1999-2017, by Zend Technologies
Есть идеи, почему и как я могу это исправить?
Я нахожусь на Kubuntu 17.10 btw
Если я продолжу устанавливать его снова:
$ sudo apt-get install php7.0-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php7.0-gd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php7.0-gd' has no installation candidate
Почему ??
РЕДАКТИРОВАТЬ 1:
$ sudo apt-get install php-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-gd is already the newest version (1:7.1+54ubuntu1).
0 to upgrade, 0 to newly install, 0 to remove and 86 not to upgrade.
РЕДАКТИРОВАТЬ 2:
Но есть кое-что странное - я на PHP 7.0, но GD ниже - php7.1-gd,
$ sudo apt-cache search php7-*
libapache2-mod-php7.1 - server-side, HTML-embedded scripting language (Apache 2 module)
php-all-dev - package depending on all supported PHP development packages
php7.1 - server-side, HTML-embedded scripting language (metapackage)
php7.1-cgi - server-side, HTML-embedded scripting language (CGI binary)
php7.1-cli - command-line interpreter for the PHP scripting language
php7.1-common - documentation, examples and common module for PHP
php7.1-curl - CURL module for PHP
php7.1-dev - Files for PHP7.1 module development
php7.1-gd - GD module for PHP
php7.1-gmp - GMP module for PHP
php7.1-json - JSON module for PHP
php7.1-ldap - LDAP module for PHP
php7.1-mysql - MySQL module for PHP
php7.1-odbc - ODBC module for PHP
php7.1-opcache - Zend OpCache module for PHP
php7.1-pgsql - PostgreSQL module for PHP
php7.1-pspell - pspell module for PHP
php7.1-readline - readline module for PHP
php7.1-recode - recode module for PHP
php7.1-snmp - SNMP module for PHP
php7.1-sqlite3 - SQLite3 module for PHP
php7.1-tidy - tidy module for PHP
php7.1-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php7.1-xmlrpc - XMLRPC-EPI module for PHP
libphp7.1-embed - HTML-embedded scripting language (Embedded SAPI library)
php-amqp - AMQP extension for PHP
php-apcu - APC User Cache for PHP
php-ds - PHP extension providing efficient data structures for PHP 7
php-gearman - PHP wrapper to libgearman
php-geoip - GeoIP module for PHP
php-gmagick - Provides a wrapper to the GraphicsMagick library
php-gnupg - PHP wrapper around the gpgme library
php-http - PECL HTTP module for PHP Extended HTTP Support
php-igbinary - igbinary PHP serializer
php-imagick - Provides a wrapper to the ImageMagick library
php-libsodium - PHP wrapper for the Sodium cryptographic library
php-mailparse - Email message manipulation for PHP
php-memcache - memcache extension module for PHP
php-memcached - memcached extension module for PHP, uses libmemcached
php-mongodb - MongoDB driver for PHP
php-msgpack - PHP extension for interfacing with MessagePack
php-oauth - OAuth 1.0 consumer and provider extension
php-pinba - Pinba module for PHP
php-propro - propro module for PHP
php-ps - ps module for PHP
php-radius - radius client library for PHP
php-raphf - raphf module for PHP
php-redis - PHP extension for interfacing with Redis
php-remctl - PECL module for Kerberos-authenticated command execution
php-rrd - PHP bindings to rrd tool system
php-sass - PHP bindings to libsass - fast, native Sass parsing in PHP
php-smbclient - PHP wrapper for libsmbclient
php-solr - PHP extension for communicating with Apache Solr server
php-ssh2 - Bindings for the libssh2 library
php-stomp - Streaming Text Oriented Messaging Protocol (STOMP) client module for PHP
php-symfony-polyfill-php70 - Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
php-tideways - Tideways PHP Profiler Extension
php-uploadprogress - file upload progress tracking extension for PHP
php-uuid - PHP UUID extension
php-xdebug - Xdebug Module for PHP
php-yac - YAC (Yet Another Cache) for PHP
php-yaml - YAML-1.1 parser and emitter for PHP
php-zmq - ZeroMQ messaging bindings for PHP
php7.1-bcmath - Bcmath module for PHP
php7.1-bz2 - bzip2 module for PHP
php7.1-dba - DBA module for PHP
php7.1-enchant - Enchant module for PHP
php7.1-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.1-imap - IMAP module for PHP
php7.1-interbase - Interbase module for PHP
php7.1-intl - Internationalisation module for PHP
php7.1-mapi - Complete and feature rich groupware solution - PHP MAPI bindings
php7.1-mbstring - MBSTRING module for PHP
php7.1-mcrypt - libmcrypt module for PHP
php7.1-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary)
php7.1-soap - SOAP module for PHP
php7.1-sybase - Sybase module for PHP
php7.1-xsl - XSL module for PHP (dummy)
php7.1-zip - Zip module for PHP
php7cc - command line tool to detect PHP 7 incompatible code
php7.0-mysql - MySQL module for PHP
php7.0-readline - readline module for PHP
php7.0-opcache - Zend OpCache module for PHP
php7.0-mbstring - MBSTRING module for PHP
php7.0 - server-side, HTML-embedded scripting language (metapackage)
php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary)
libapache2-mod-php7.0 - server-side, HTML-embedded scripting language (Apache 2 module)
php7.0-mcrypt - libmcrypt module for PHP
php7.0-curl - CURL module for PHP
php7.0-cli - command-line interpreter for the PHP scripting language
php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.0-xmlrpc - XMLRPC-EPI module for PHP
php7.0-json - JSON module for PHP
php7.0-common - documentation, examples and common module for PHP
php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
Вызывает ли это проблему?Должен ли я удалить php7.1-gd?