On my Wordpress site the cURL command doesn't seem to work:
When I login into Wordpress, it clearly says cURL is not installed:
However, when I SSH into my EC2 instance, I shows that cURL is installed:
$ curl --version
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.3.0 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
Because PHP is outdated, maybe it could be an PHP issue? When I check my PHP version, I shows I have the latest version installed:
$ php -v
PHP 8.2.1 (cli) (built: Jan 13 2023 10:42:21) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.1, Copyright (c) Zend Technologies
with Zend OPcache v8.2.1, Copyright (c), by Zend Technologies
But when I list all my PHP installs, I see that the top one corresponds with the one mentioned in Wordpress (7.3.33-9+ubuntu18.04.1+deb.sury.org+1):
$ dpkg --list | grep php
ii libapache2-mod-php7.3 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii libapache2-mod-php8.2 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all server-side, HTML-embedded scripting language (default)
ii php-common 2:93+ubuntu18.04.1+deb.sury.org+2 all Common files for PHP packages
ii php-curl 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all CURL module for PHP [default]
ii php-fpm 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all server-side, HTML-embedded scripting language (FPM-CGI binary) (default)
ii php-gd 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all GD module for PHP [default]
ii php-mbstring 2:8.2+93+ubuntu18.04.1+deb.sury.org+2 all MBSTRING module for PHP [default]
rc php7.0-curl 7.0.33-0ubuntu0.16.04.2 amd64 CURL module for PHP
ii php7.2-cli 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.2-common 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.2-curl 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 CURL module for PHP
ii php7.2-fpm 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.2-gd 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php7.2-json 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.2-mbstring 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
ii php7.2-mysql 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.2-opcache 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.2-readline 7.2.34-37+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php7.3 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
ii php7.3-cli 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.3-common 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php7.3-json 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP
ii php7.3-mysql 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 MySQL module for PHP
ii php7.3-opcache 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php7.3-readline 7.3.33-9+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
ii php8.2 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
ii php8.2-cli 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php8.2-common 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
ii php8.2-curl 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 CURL module for PHP
ii php8.2-fpm 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php8.2-gd 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 GD module for PHP
ii php8.2-mbstring 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
ii php8.2-opcache 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
ii php8.2-readline 8.2.1-2+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
I've also tried rebooting from the AWS EC2 dashboard.
lel, you have php7.0-curl and php7.2-curl and php8.2-curl, but you run WordPress on the 1 php where you don't have curl: php7.3
sudo apt update;
sudo apt install php7.3-curl;
you should consider upgrading the php you run wordpress on though: PHP7.3 went EOL 6 desember 2021; by comparison, PHP8.2 is scheduled to go EOL 8 desember 2025.
it's very rare that you need any PHP5 version other than 5.6, and any PHP7 version other than 7.4, i suggest you install php7.4 and uninstall 7.0, 7.2, and 7.3.
I newly install Dompdf in Laravel Project via Composer (composer require barryvdh/laravel-dompdf). After enter the Command Terminal Reply Following Errors.
Problem 1
- dompdf/dompdf v0.7.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- barryvdh/laravel-dompdf v0.7.0 requires dompdf/dompdf ^0.7 -> satisfiable by dompdf/dompdf[v0.7.0].
- Installation request for barryvdh/laravel-dompdf ^0.7.0 -> satisfiable by barryvdh/laravel-dompdf[v0.7.0].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/5.6/cli/php.ini
- /etc/php/5.6/cli/conf.d/10-opcache.ini
- /etc/php/5.6/cli/conf.d/10-pdo.ini
- /etc/php/5.6/cli/conf.d/15-xml.ini
- /etc/php/5.6/cli/conf.d/20-calendar.ini
- /etc/php/5.6/cli/conf.d/20-ctype.ini
- /etc/php/5.6/cli/conf.d/20-dom.ini
- /etc/php/5.6/cli/conf.d/20-exif.ini
- /etc/php/5.6/cli/conf.d/20-fileinfo.ini
- /etc/php/5.6/cli/conf.d/20-ftp.ini
- /etc/php/5.6/cli/conf.d/20-gettext.ini
- /etc/php/5.6/cli/conf.d/20-iconv.ini
- /etc/php/5.6/cli/conf.d/20-json.ini
- /etc/php/5.6/cli/conf.d/20-mbstring.ini
- /etc/php/5.6/cli/conf.d/20-phar.ini
- /etc/php/5.6/cli/conf.d/20-posix.ini
- /etc/php/5.6/cli/conf.d/20-readline.ini
- /etc/php/5.6/cli/conf.d/20-shmop.ini
- /etc/php/5.6/cli/conf.d/20-simplexml.ini
- /etc/php/5.6/cli/conf.d/20-sockets.ini
- /etc/php/5.6/cli/conf.d/20-sysvmsg.ini
- /etc/php/5.6/cli/conf.d/20-sysvsem.ini
- /etc/php/5.6/cli/conf.d/20-sysvshm.ini
- /etc/php/5.6/cli/conf.d/20-tokenizer.ini
- /etc/php/5.6/cli/conf.d/20-wddx.ini
- /etc/php/5.6/cli/conf.d/20-xmlreader.ini
- /etc/php/5.6/cli/conf.d/20-xmlwriter.ini
- /etc/php/5.6/cli/conf.d/20-xsl.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
How to Solve this Error
I already Installed GD using Following comment. sudo apt-get install php5-gd and also Apache Server Restarted. My Laravel Version is 5.3 and Ubuntu Version is 14.04
I have installed php7, I did the following to solve exactly the same error
sudo apt-get install php7.0-gd
sudo apt-get install php7.0-intl
sudo apt-get install php7.0-xsl
If you are working in PHP version 5.* then you have to install
sudo apt-get install php5-gd
And if you are working in PHP version 7.* then you have to install
sudo apt-get install php7.0-gd
Hope it will work...
And if you are working in PHP version 7.2 then you have to install
sudo apt-get install php7.2-gd... it worked for me
For php-8, just locate your php.ini file and uncomment the line extension=gd
Below is a picture guide for those using Xampp and Windows
Step 1: Open php.ini or locate it in your machine (C:/xampp/php/php.ini)
Step 2: Uncomment the line extension=gd by removing the semicolon
Step 3: Save your file and restart your services
Open your php.ini and uncomment this line:
;extension=php_gd2.dll
It may not be enabled for php-cli, you can enable like this;
sudo phpenmod gd
UPDATE
I guess, you are using ppa:ondrej php package (5.6), which is confusing you with default ubuntu 14.04 php package (5.5.9).
To install php 5.6 gd library from ppa:ondrej, you should use:
sudo apt-get install php5.6-gd
PHP 7.4.2 (cli) (built: Feb 5 2020 16:50:21) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies
For Php 7.4.2
sudo apt-get install php7.4-gd
sudo phpenmod gd
Before installing the missing dependency, you need to check which version of PHP is installed on your system.
php -v
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
In this case it's php7.2. apt search php7.2 returns all the available PHP extensions.
apt search php7.2
Sorting... Done
Full Text Search... Done
libapache2-mod-php7.2/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
server-side, HTML-embedded scripting language (Apache 2 module)
libphp7.2-embed/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
HTML-embedded scripting language (Embedded SAPI library)
php-all-dev/bionic,bionic 1:60ubuntu1 all
package depending on all supported PHP development packages
php7.2/bionic-updates,bionic-updates,bionic-security,bionic-security 7.2.10-0ubuntu0.18.04.1 all
server-side, HTML-embedded scripting language (metapackage)
php7.2-bcmath/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
Bcmath module for PHP
php7.2-bz2/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
bzip2 module for PHP
php7.2-cgi/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
server-side, HTML-embedded scripting language (CGI binary)
php7.2-cli/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed,automatic]
command-line interpreter for the PHP scripting language
php7.2-common/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed,automatic]
documentation, examples and common module for PHP
php7.2-curl/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed]
CURL module for PHP
php7.2-dba/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
DBA module for PHP
php7.2-dev/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
Files for PHP7.2 module development
php7.2-enchant/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
Enchant module for PHP
php7.2-fpm/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed]
server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.2-gd/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed]
GD module for PHP
php7.2-gmp/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
GMP module for PHP
php7.2-imap/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
IMAP module for PHP
php7.2-interbase/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
Interbase module for PHP
php7.2-intl/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
Internationalisation module for PHP
php7.2-json/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed,automatic]
JSON module for PHP
php7.2-ldap/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
LDAP module for PHP
php7.2-mbstring/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed,automatic]
MBSTRING module for PHP
php7.2-mysql/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
MySQL module for PHP
php7.2-odbc/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
ODBC module for PHP
php7.2-opcache/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed,automatic]
Zend OpCache module for PHP
php7.2-pgsql/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
PostgreSQL module for PHP
php7.2-phpdbg/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
server-side, HTML-embedded scripting language (PHPDBG binary)
php7.2-pspell/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
pspell module for PHP
php7.2-readline/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed,automatic]
readline module for PHP
php7.2-recode/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
recode module for PHP
php7.2-snmp/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
SNMP module for PHP
php7.2-soap/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
SOAP module for PHP
php7.2-sqlite3/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed]
SQLite3 module for PHP
php7.2-sybase/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
Sybase module for PHP
php7.2-tidy/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
tidy module for PHP
php7.2-xml/bionic-updates,bionic-security,now 7.2.10-0ubuntu0.18.04.1 amd64 [installed]
DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php7.2-xmlrpc/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
XMLRPC-EPI module for PHP
php7.2-xsl/bionic-updates,bionic-updates,bionic-security,bionic-security 7.2.10-0ubuntu0.18.04.1 all
XSL module for PHP (dummy)
php7.2-zip/bionic-updates,bionic-security 7.2.10-0ubuntu0.18.04.1 amd64
Zip module for PHP
You can now proceed to installing the missing dependency by running:
sudo apt install php7.2-gd
if you are working in PHP version 7.2 then you have to install
sudo apt-get install php7.2-gd
For php 7.1
sudo apt-get install php7.1-gd
Cheers!
I'm working on php 8.0.9, and I just uncomment this on php.ini in xampp/php/php.ini directory.
from
;extension=gd
to
extension=gd
and it's work normal again
The solution is quite simple.
In your php.ini, just uncomment the line extension=php_gd2.dll (or .so extension for unix systems.)
Hope it helps.
This worked for me:
composer require "ext-gd:*" --ignore-platform-reqs
As of Composer 2.0 on Arch, I use: --ignore-platform-req=ext-gd
Eg:
php composer install -n --ignore-platform-req=ext-gd
Eg: (to ignore multiple requirements)
php composer install -n --ignore-platform-req=ext-gd --ignore-platform-req=ext-ldap
Ignoring Composer requirements may be necessary because Composer may return false warnings on dependencies that are already properly installed and enabled, consider this Arch forum article:
I have installed php-gd and uncommeted extension=gd.so in /etc/php/php.ini as the wiki says
Thanks for this answer on a related Question, How to always use ignore-platform-reqs flag when running composer?
Using Manjaro(Arch) Linux:
$ sudo pacman -S php-gd
In file /etc/php/php-ini, add the line:
extension=gd.so
For Windows :
Uncomment this line in your php.ini file
;extension=php_gd2.dll
If the above step doesn't work uncomment the following line as well:
;extension=gd2
sudo apt-get install php7.4-zip
Use your version of php. Like here I used 7.4
CentOS
sudo yum install php-gd
Unbuntu
sudo apt install php-gd
First Check your php version
sudo php -v
Then install php gd package of relevent version.
sudo apt-get install php${version}-gd
Finally run
composer update
On CentOS 7, try running following command:
sudo yum install php72u-gd.x86_64
in docker I found a same problem, even after
"rm /etc/apt/preferences.d/no-debian-php"
then
"apt update"
"apt install php7.4-gd"
"php composer.phar update"
error " ..... ext-gd ....."
so my solution is direct using php7.4
"php7.4 composer.phar update"
and its work. I dont know why.
It may help you
apt install php-xml
systemctl restart apache2
From reference here, you may learn in brief.
Thanks :)
On Local or Xampp in windows
go to : C:\xampp\php\php.ini
uncomment extension=gd
PHP VERSION - 7.3.21
WAMP SERVER
// use below command to fix ext-gd issue
// work for me
composer require "ext-gd:*" --ignore-platform-reqs phpoffice/phpspreadsheet
I am struggling with the php-curl installation which cannot be found, I have seen plenty of topics related to it but it unfortunatelly did not help much. I want it for an curl function in a php program.
I tried it via adding ppa:ondrej/php repository, but I think it simply does not help much.
kali#kali$ sudo apt-get install php7.3
php7.3 php7.3-common php7.3-mysql php7.3-readline
php7.3-cli php7.3-json php7.3-opcache
kali#kali:$ sudo apt-get install php7.3-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3-curl
E: Couldn't find any package by glob 'php7.3-curl'
E: Couldn't find any package by regex 'php7.3-curl'
kali#kali:$ sudo apt-get install php7-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7-curl
$ sudo apt-get install php-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php-curl
$ sudo add-apt-repository ppa:ondrej/php
Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.
Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa
You can get more information about the packages at https://deb.sury.org
IMPORTANT: The <foo>-backports is now required on older Ubuntu releases.
BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting
CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline
or ppa:ondrej/nginx
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/
WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:
# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox '/tmp/tmpfx71elke/pubring.gpg' created
gpg: /tmp/tmpfx71elke/trustdb.gpg: trustdb created
gpg: key 4F4EA0AAE5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg: imported: 1
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.
$ sudo apt-get update
Ign:1 http://ppa.launchpad.net/ondrej/php/ubuntu hirsute InRelease
Hit:2 https://download.docker.com/linux/debian buster InRelease
Err:3 http://ppa.launchpad.net/ondrej/php/ubuntu hirsute Release
404 Not Found [IP: 91.189.95.85 80]
Hit:4 http://kali.koyanet.lv/kali kali-rolling InRelease
Hit:5 https://packages.gitlab.com/gitlab/gitlab-ce/debian jessie InRelease
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu hirsute Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
$ sudo apt-get install php
php7.3 php7.3-common php7.3-mysql php7.3-readline php-defaults
php7.3-cli php7.3-json php7.3-opcache php-common php-mysql
///// still cannot see curl module
More info about versions and system running it:
My php version is 7.3.12
kali#kali:$ php -v
PHP 7.3.12-1 (cli) (built: Nov 28 2019 07:34:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.12-1, Copyright (c) 1999-2018, by Zend Technologies
kali#kali:$ apt list --installed | grep php
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libapache2-mod-php7.3/now 7.3.12-1 amd64 [installed,local]
libapache2-mod-php/now 2:7.3+69 all [installed,local]
php-common/now 2:69 all [installed,local]
php-mysql/now 2:7.3+69 all [installed,local]
php7.3-cli/now 7.3.12-1 amd64 [installed,local]
php7.3-common/now 7.3.12-1 amd64 [installed,local]
php7.3-json/now 7.3.12-1 amd64 [installed,local]
php7.3-mysql/now 7.3.12-1 amd64 [installed,local]
php7.3-opcache/now 7.3.12-1 amd64 [installed,local]
php7.3-readline/now 7.3.12-1 amd64 [installed,local]
php -m
[PHP Modules]
calendar
Core
ctype
date
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
Kali version
$ uname -irv
5.4.0-kali3-amd64 #1 SMP Debian 5.4.13-1kali1 (2020-01-20) unknown
sources
$ cat /etc/apt/sources.list | grep -v "#"
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
I found there might have been some bugs
It was an issue with sources.list changed a lot time ago.
I updated it with other repositiories and it started working.
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb https://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
deb-src https://http.kali.org/kali kali-rolling main contrib non-free
Next I have run sudo apt-get update.
Now I am able to see all the packages that were missing before.
After reading several posts (I read an issue with OpenSSL but did not understand how to solve this error), I have not found any solutions to this issue. I understand that it is a connection failure of the postgresql database. It is not clear to me, though, why this happens in my laptop, I am working internally (localhost level) so it should be no problem at all. In fact, some time ago this worked before in my laptop, perhaps some software upgrading changed things. Nevertheless, this is what I get:
Warning: pg_query(): Query failed: SSL SYSCALL error: EOF detected in /mnt/windowsd/WEBs/php/pg.php on line 293
An SQL error occured.
Line 293 refers to:
292 # Try query or error
293 $rs = pg_query($conn, $sql);
294 if (!$rs) {
295 echo "An SQL error occured.\n";
296 exit;
297 }
and variable $conn is:
9 # connect to PostgreSQL database
10 $conn = pg_connect("user='aaaa' password='aaaa' dbname='aaaa' host='localhost'");
11 if (!$conn) {
12 echo "Not connected : " . pg_error();
13 exit;
14 }
How can I solve this SSL SYSCALL error?
Any hints are appreciated.
System:
ii postgresql-9.3 9.3.24-0ubuntu0.14.04 amd64 object-relational SQL database, version 9.3 server
ii postgresql-9.3-postgis-2.2 2.2.2+dfsg-2~trusty1 amd64 Geographic objects support for PostgreSQL 9.3
ii postgresql-9.3-postgis-scripts 2.2.2+dfsg-2~trusty1 all Geographic objects support for PostgreSQL 9.3 -- scripts
ii postgresql-client-9.3 9.3.24-0ubuntu0.14.04 amd64 front-end programs for PostgreSQL 9.3
ii postgresql-client-common 154ubuntu1.1 all manager for multiple PostgreSQL client versions
ii postgresql-common 154ubuntu1.1 all PostgreSQL database-cluster manager
ii postgresql-contrib-9.3 9.3.24-0ubuntu0.14.04 amd64 additional facilities for PostgreSQL
ii libapache2-mod-php5 5.5.9+dfsg-1ubuntu4.27 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php5 5.5.9+dfsg-1ubuntu4.27 all server-side, HTML-embedded scripting language (metapackage)
ii php5-cgi 5.5.9+dfsg-1ubuntu4.27 amd64 server-side, HTML-embedded scripting language (CGI binary)
ii php5-cli 5.5.9+dfsg-1ubuntu4.27 amd64 command-line interpreter for the php5 scripting language
ii php5-common 5.5.9+dfsg-1ubuntu4.27 amd64 Common files for packages built from the php5 source
ii php5-curl 5.5.9+dfsg-1ubuntu4.27 amd64 CURL module for php5
ii php5-dev 5.5.9+dfsg-1ubuntu4.26 amd64 Files for PHP5 module development
ii php5-fpm 5.5.9+dfsg-1ubuntu4.27 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php5-json 1.3.2-2build1 amd64 JSON module for php5
ii php5-pgsql 5.5.9+dfsg-1ubuntu4.27 amd64 PostgreSQL module for php5
ii apache2 2.4.7-1ubuntu4.21 amd64 Apache HTTP Server
ii apache2-bin 2.4.7-1ubuntu4.21 amd64 Apache HTTP Server (binary files and modules)
ii apache2-data 2.4.7-1ubuntu4.21 all Apache HTTP Server (common files)
ii apache2-dev 2.4.7-1ubuntu4.21 amd64 Apache HTTP Server (development headers)
ii apache2-mpm-prefork 2.4.7-1ubuntu4.21 amd64 transitional prefork MPM package for apache2
ii apache2-mpm-worker 2.4.7-1ubuntu4.21 amd64 transitional worker MPM package for apache2
ii apache2-utils 2.4.7-1ubuntu4.21 amd64 Apache HTTP Server (utility programs for web servers)
ii libapache2-mod-auth-pgsql 2.0.3-6ubuntu0.1 amd64 Module for Apache2 which provides PostgreSQL authentication
ii libapache2-mod-fastcgi 2.4.7~0910052141-1.1 amd64 Apache 2 FastCGI module for long-running CGI scripts
ii libapache2-mod-mapcache 1.6.1-1~trusty0 amd64 tile caching server - Apache module
ii libapache2-mod-php5 5.5.9+dfsg-1ubuntu4.27 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii globus-openssl-module-progs 3.3-2 amd64 Globus Toolkit - Globus OpenSSL Module Wrapper Programs
ii lcmaps-openssl-interface 1.6.1-2 all LCMAPS header files for OpenSSL interfaces
ii libcrypt-openssl-bignum-perl 0.04-4build1 amd64 Perl module to access OpenSSL multiprecision integer arithmetic libraries
ii libcrypt-openssl-dsa-perl 0.14-1 amd64 module which implements the DSA signature verification system
ii libcrypt-openssl-random-perl 0.04-1build6 amd64 Access to the OpenSSL pseudo-random number generator
ii libcrypt-openssl-rsa-perl 0.28-1build1 amd64 module for RSA encryption using OpenSSL
ii libcrypt-openssl-x509-perl 1.8.4-1 amd64 Perl extension to OpenSSL's X509 API
ii libcurl4-openssl-dev:amd64 7.35.0-1ubuntu2.20 amd64 development files and documentation for libcurl (OpenSSL flavour)
ii libengine-pkcs11-openssl 0.1.8-3 amd64 OpenSSL engine for PKCS#11 modules
ii libevent-openssl-2.0-5:amd64 2.0.21-stable-1ubuntu1.14.04.2 amd64 Asynchronous event notification library (openssl)
ii libglobus-gsi-openssl-error-dbg:amd64 2.1-5 amd64 Globus Toolkit - Globus OpenSSL Error Handling Debug Symbols
ii libglobus-gsi-openssl-error-dev:amd64 2.1-5 amd64 Globus Toolkit - Globus OpenSSL Error Handling Development Files
ii libglobus-gsi-openssl-error-doc 2.1-5 all Globus Toolkit - Globus OpenSSL Error Handling Documentation Files
ii libglobus-gsi-openssl-error0:amd64 2.1-5 amd64 Globus Toolkit - Globus OpenSSL Error Handling
ii libglobus-openssl-module-dbg:amd64 3.3-2 amd64 Globus Toolkit - Globus OpenSSL Module Wrapper Debug Symbols
ii libglobus-openssl-module-dev:amd64 3.3-2 amd64 Globus Toolkit - Globus OpenSSL Module Wrapper Development Files
ii libglobus-openssl-module-doc 3.3-2 all Globus Toolkit - Globus OpenSSL Module Wrapper Documentation Files
ii libglobus-openssl-module0:amd64 3.3-2 amd64 Globus Toolkit - Globus OpenSSL Module Wrapper
ii libgnutls-openssl27:amd64 2.12.23-12ubuntu2.8 amd64 GNU TLS library - OpenSSL wrapper
ii libpathfinder-openssl-1 1.1.3-0.4 amd64 Pathfinder integration Library for OpenSSL
ii libxmlsec1-openssl 1.2.18-2ubuntu1 amd64 Openssl engine for the XML security library
ii openssl 1.0.1f-1ubuntu2.27 amd64 Secure Sockets Layer toolkit - cryptographic utility
ii openssl-blacklist 0.5-3 all Blacklists for OpenSSL RSA keys and tools
ii openssl-blacklist-extra 0.5-3 all Non-default blacklists of OpenSSL RSA keys
ii python-openssl 0.13-2ubuntu6 amd64 Python 2 wrapper around the OpenSSL library
ii python-openssl-dbg 0.13-2ubuntu6 amd64 Python 2 wrapper around the OpenSSL library (debug extension)
ii python-openssl-doc 0.13-2ubuntu6 all Python wrapper around the OpenSSL library (documentation package)
ii python3-openssl 0.13-2ubuntu6 amd64 Python 3 wrapper around the OpenSSL library
ii python3-openssl-dbg 0.13-2ubuntu6 amd64 Python 3 wrapper around the OpenSSL library (debug extension)
ii strongswan-plugin-openssl 5.1.2-0ubuntu2.11 amd64 strongSwan plugin for OpenSSL