Call to undefined function curl_init() even it is enabled in php7

前端 未结 10 657
旧巷少年郎
旧巷少年郎 2020-12-03 01:00

I\'ve just installed php7 to my Ubuntu. At first, there was no problem, my web site was working. But suddenly, it started to return Call to undefined function curl_init() er

10条回答
  •  攒了一身酷
    2020-12-03 01:32

    Scratched my head over this for a while, curl module was loaded but still got the error.
    This happen after I upgraded from Debian Stretch to Buster.

    The reason was that php7.3-curl was installed and used, but apache run php7.0 even though 7.3 was installed. So I removed php7.0 and reinstalled libapache2 to get it working

    apt-get remove php-7.0
    apt-get remove libapache2-mod-php7.3
    apt-get install libapache2-mod-php7.3
    

提交回复
热议问题