2017-07-09 114 views
0

嗨我已经在运行php 5.6的ubuntu 14.04上安装了wordpress 4.6站点。调用未定义的函数curl_version

管理页面是不可见的,我可以在日志中看到如下错误: -

致命错误:调用未定义功能curl_version()在/ var/www/html等/文件/模块/ postie/postie。 php on line 274

我该如何解决这个问题?

我核实,卷曲和PHP5卷曲安装在我们的服务器上: -

[email protected]:/var/www/html$ sudo apt-get install curl 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
curl is already the newest version. 
0 upgraded, 0 newly installed, 0 to remove and 137 not upgraded. 
[email protected]:/var/www/html$ sudo apt-get install php5-curl 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
php5-curl is already the newest version. 
0 upgraded, 0 newly installed, 0 to remove and 137 not upgraded. 
+0

你运行过'sudo service apache2 restart'吗? –

+0

是多次 – Max08

回答

0

我能够最终解决这个问题。

我有三个php安装在我的ubuntu盒子 - php5,php5.6和php7。 php5安装了curl,但被apache忽略了。 Apache使用php5.6。我去了/ etc/apache2/mods-enabled并删除了除php5之外的所有php链接。

1

在Debian和Ubuntu的最新版本,你或许能在安装了Curl扩展库解决这个问题,并重新启动网络服务器。假设Web服务器就是Apache 2:

sudo apt-get install php5-curl

sudo service apache2 restart

这是可能的,你需要安装更多:

sudo apt-get install curl libcurl3 libcurl3-dev;

+0

的apt-get安装PHP5卷曲 读取软件包列表...完成 大厦的依赖关系树 读取状态信息...完成 包PHP5卷曲不可用,而是由另一包提及。 这可能意味着包缺失,已被废弃,或仅可从其他来源获得 – user3673