在Debian9上为PHP7启用curl扩展

在Debian9上为PHP7启用curl扩展,php,curl,testing,debian,Php,Curl,Testing,Debian,系统:DebianGNU/Linux9.0(stretch);命令行上的PHPV7.0.15-1;phpversion()显示:PHP版本5.6.24-1+b1 我已经用apt get install php curl安装了curl,但是curl函数在php中不可用。(php7的php curl安装curl) 返回:“Curl:Disabled”;另外,当我运行phpinfo()时,没有列出curl php5模块已启用,但debian 9中没有php5 curl或php5.6-curl包。当我安

系统:DebianGNU/Linux9.0(stretch);命令行上的PHPV7.0.15-1;phpversion()显示:PHP版本5.6.24-1+b1

我已经用apt get install php curl安装了curl,但是curl函数在php中不可用。(php7的php curl安装curl)

返回:“Curl:Disabled”;另外,当我运行phpinfo()时,没有列出curl

php5模块已启用,但debian 9中没有php5 curl或php5.6-curl包。当我安装php-7或php-7.1时,我得到:
php5模块已启用,未启用PHP7.1

如何在debian9上禁用php5模块并启用php7,或者在debian9下安装php5 curl

干杯
Piotr

好的,我找到了一个解决方案;有一个名为modules enabled的文件夹,其中包含指向模块的符号链接;我刚刚删除了到php5的链接,并创建了到php7的新链接;现在phpinfo()显示了php7和curl模块,我认为这是安装php7.0-curl的好方法
echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled'