1

I have a problem with my web server since upgrading to buster. PHP doesn't seem to see the curl library :

root@myserver ~ # php -r "curl_init();" PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in Command line code:1 Stack trace: #0 {main} thrown in Command line code on line 1 root@myserver ~ # apt-get install php-curl Reading package lists... Done Building dependency tree Reading state information... Done php-curl is already the newest version (2:7.3+69). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. root@myserver ~ # apt-get install php7.3-curl Reading package lists... Done Building dependency tree Reading state information... Done php7.3-curl is already the newest version (7.3.14-1~deb10u1). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. root@myserver ~ # root@myserver ~ # php --version PHP 7.0.33-1~dotdeb+8.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.33-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies 

Must be something very silly, but what?

1 Answer 1

2

You have php7.3-curl for PHP 7.3, but your PHP CLI is PHP 7.0 7.0.33-1~dotdeb+8.1 from Zend OPcache.

Do you have php7.3-cli installed? If not, then

sudo apt install php7.3-cli 
2
  • yes that was it! thank you. In fact this was a reduction of the cgi issue so the package was php7.3-cgi but problem fixed. Thanks again! Commented May 1, 2020 at 15:11
  • 2
    Also consider using php7.3-fpm. That's even more efficient. Commented May 1, 2020 at 16:09

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.