最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

multisite - WP-CLI Error Requesting CURL Extension

programmeradmin1浏览0评论

Instantly fell in love with WP-Cli... life at real speed, ditch the GUI.. :-)

Each time that I run a command, it executes successfully, however I get the following error message and warning:

<br/><b style='font-size:16px; color:red;'>curl_exec function is disabled in php.ini</b> - <i style='font-size:12px; color:red;'>Social Networks AutoPoster needs the CURL PHP extension. Please enable it or contact your hosting company to enable it.</i><br/><br/>Installing Multisite Toolbar Additions (2.0.1)
Warning: Failed to create directory '/home/user/.wp-cli/cache/': mkdir(): Permission denied.
Downloading installation package from .2.0.1.zip...
Unpacking the package...
Installing the plugin...
Plugin installed successfully.
Network-activating 'multisite-toolbar-additions'...
Plugin 'multisite-toolbar-additions' network activated.
Success: Installed 1 of 1 plugins.

However the output of .php confirms that curl support is stalled properly

Instantly fell in love with WP-Cli... life at real speed, ditch the GUI.. :-)

Each time that I run a command, it executes successfully, however I get the following error message and warning:

<br/><b style='font-size:16px; color:red;'>curl_exec function is disabled in php.ini</b> - <i style='font-size:12px; color:red;'>Social Networks AutoPoster needs the CURL PHP extension. Please enable it or contact your hosting company to enable it.</i><br/><br/>Installing Multisite Toolbar Additions (2.0.1)
Warning: Failed to create directory '/home/user/.wp-cli/cache/': mkdir(): Permission denied.
Downloading installation package from https://downloads.wordpress/plugin/multisite-toolbar-additions.2.0.1.zip...
Unpacking the package...
Installing the plugin...
Plugin installed successfully.
Network-activating 'multisite-toolbar-additions'...
Plugin 'multisite-toolbar-additions' network activated.
Success: Installed 1 of 1 plugins.

However the output of https://localhost.sitedomain/phpinfo.php confirms that curl support is stalled properly

Share Improve this question asked Oct 28, 2020 at 11:17 mjonesmjones 1531 silver badge11 bronze badges 7
  • That doesn't look like a WP CLI error, the error message is formatted in HTML and names a plugin, are you sure this is a WP CLI problem and not a bug in that plugin? – Tom J Nowell Commented Oct 28, 2020 at 12:42
  • not sure at all.. completely new to wp-cli.. Its just that I don't receive any error message or warning via the gui... – mjones Commented Oct 28, 2020 at 13:50
  • Social Networks AutoPoster needs the CURL PHP extension., keep in mind that PHP FPM/CGI-BIN isn't quite the same as PHP CLI. Just because you have an extension listed in PHP info when you load it in the browser, doesn't mean it's present on CLI. You would need to run PHP Info via CLI and compare the output. But that's a dev ops problem not a WP problem. For Social Networks AutoPoster you should contact their support, plugins and themes can still misbehave and generate warnings on CLI just like they would in the browser, except it's harder to hide warnings and errors – Tom J Nowell Commented Oct 28, 2020 at 15:17
  • Ok will do... thx for the follow up – mjones Commented Oct 28, 2020 at 15:52
  • What about the Warning: Failed to create directory '/home/user/.wp-cli/cache/': mkdir(): Permission denied. Warning – mjones Commented Oct 28, 2020 at 15:57
 |  Show 2 more comments

1 Answer 1

Reset to default 0

Though, curl appeared to be properly working from https://localhost.sitedomain/phpinfo.php , the true cause of the error was that curl was in fact disabled within the global php.ini file located at /etc/php/<php version #>/php.ini , which is different from local active php.ini located at /etc/php/7.3/apache2/php.ini . Now everything works properly.

发布评论

评论列表(0)

  1. 暂无评论