Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Curl errors and no cli commands in Windows

plugins solved

Started by Chris Brown 8 years ago · 0 replies · 2522 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 vollstock, 4 days ago
3 97 4 days ago
Installation & Hosting · by David, 7 years ago
3 3395 2 weeks ago
Installation & Hosting · by David Meissner, 3 weeks ago
3 248 2 weeks ago
Installation & Hosting · by David Meissner, 3 weeks ago
0 172 3 weeks ago
Installation & Hosting · by Anthony J Cervo, 4 weeks ago
3 237 3 weeks ago