Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Curl errors and no cli commands in Windows

plugins solved

Started by Chris Brown 8 years ago · 0 replies · 2448 views
8 years ago

Having installed GRAV on Windows 10 and started using Mamp I ran into the problem documented elsewhere that I couldn't run cli commands like gpm and plungin because of the folloing error:

FATAL: DEVTOOLS requires PHP Curl module to be installed

This problem has been discussed elsewhere on the forums (ref. /forum/archive/unable-to-use-cli-commands-keep-getting-curl-errors-t4375). It took me a while to join the dots and solve so I'm posting the solution I found.

Searching the forums, I located the php.ini file for the server (make a php script with <?php phpinfo() ?> and run it in your browser, find "loaded configuration file" and read off the location for php.ini). I checked this file, and the _extension=php_curl.dll_ line was uncommented. This was confirmed further down on the php info page in the browser I just called up in the browser - cURL support was enabled. So I was puzzled as to why the error was occuring.

However, at the command line running, php -m, curl was not listed.

Eventually I foung the problem: there are two php environments - one for the browser associated with the local server and another for the command line. Then I found a solution:

I ran the command: php --ini. This returned the php.ini path (in my case C:\Windows). As there was no configuration file loaded, I just copied the php.ini file I'd been looking at above to this location and the problem was resolved.

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by David Meissner, 10 hours ago
0 18 10 hours ago
Installation & Hosting · by Anthony J Cervo, 5 days ago
3 114 3 days ago
Installation & Hosting · by motorambler, 2 months ago
9 787 4 weeks ago
Installation & Hosting · by jeremycherfas, 1 month ago
1 396 1 month ago
Installation & Hosting · by antoinep, 4 months ago
8 1230 4 months ago