嗨我已经在运行php 5.6的ubuntu 14.04上安装了wordpress 4.6站点.
管理页面不可见,我可以在日志中看到以下错误: -
致命错误:在第274行的/var/www/html/files/modules/postie/postie.php中调用未定义的函数curl_version()
我该如何解决?
我已经验证我们的服务器上安装了curl和php5-curl: -
ubuntu@ip-172-39-6-147:/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.
ubuntu@ip-172-39-6-147:/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.
Run Code Online (Sandbox Code Playgroud)
在当前版本的Debian和Ubuntu上,您可以通过安装PHP的Curl扩展并重新启动Web服务器来解决这个问题.假设网络服务器是Apache 2:
sudo apt-get install php5-curl
sudo service apache2 restart
您可能需要安装更多:
sudo apt-get install curl libcurl3 libcurl3-dev;
我最终能够解决这个问题。
我的 ubuntu 机器上安装了三个 php - php5、php5.6 和 php7。php5 中安装了curl,但被apache 忽略。apache 使用的是 php5.6。我转到 /etc/apache2/mods-enabled 并删除了除 php5 之外的所有 php 链接。
| 归档时间: |
|
| 查看次数: |
6019 次 |
| 最近记录: |