Runtime exception whenever gpm tries to download something

I’m in a localhost Windows environment, running PHP 5.4. I’ve been through the docs, and as far as I know all of the required modules are installed and enabled. PHP is in my PATH, and GPM is running commands, it just can’t download plugins/updates.

Example: When running bin/gpm selfupgrade -f -v, after saying yes, I want to upgrade now, the response is

Preparing to upgrade to v0.9.43..
 |- Downloading upgrade [2.31M]..      0%

  [RuntimeException]
  Error while trying to download 'https://github.com/getgrav/grav/releases/download/0.9.43/grav-update-v0.9.43.zip

Exception trace:
 () at C:\[my grav install]\system\src\Grav\Common\GPM\Response.php:216
 Grav\Common\GPM\Response::getFopen() at C:\[my grav install]\system\src\Grav\Common\GPM\Response.php:148
 Grav\Common\GPM\Response::getAuto() at C:\[my grav install]\system\src\Grav\Common\GPM\Response.php:81
 Grav\Common\GPM\Response::get() at C:\[my grav install]\system\src\Grav\Console\Gpm\SelfupgradeCommand.php:172
 Grav\Console\Gpm\SelfupgradeCommand->download() at C:\[my grav install]\system\src\Grav\Console\ Gpm\SelfupgradeCommand.php:147
 Grav\Console\Gpm\SelfupgradeCommand->execute() at C:\[my grav install]\vendor\symfony\console\Command\Command.php:259
 Symfony\Component\Console\Command\Command->run() at C:\[my grav install]\vendor\symfony\console\Application.php:878
 Symfony\Component\Console\Application->doRunCommand() at C:\[my grav install]\vendor\symfony\console\Application.php:195
 Symfony\Component\Console\Application->doRun() at C:\[my grav install]\vendor\symfony\console\Application.php:126
 Symfony\Component\Console\Application->run() at C:\[my grav install]\bin\gpm:56

self-upgrade [-f|--force] [-y|--all-yes]

Any thoughts on what could be causing this?

Dou have SSL enabled? Do you have CURL enabled? Those would be my first guesses.

Yes, the curl and openssl extensions are both enabled.

Turns out openssl was enabled in apache, but not php (even though it said it was). And now I can download the file. Php won’t unzip it, though.

I think that’s the end of the line for the “easy way”. I’ll just install everything manually.

Alternatively you might want to try MAMP or something that has everything just on and works out of the box. Really the issue here is the windows LAMP stack software, it’s normally not this hard!