Problem running gpm

Can you just create a simple PHP file (curl.php):

<?php

$ch = curl_init("http://getgrav.org/downloads/grav.json");
curl_exec($ch);
curl_close($ch);

Then run it from the command line:

$ php curl.php

You should get the output of the JSON:

{"version":"0.9.29","date":"2015-06-23T00:24:01Z","assets":{"grav-upda te":{"name":"grav-update-v0.9.29.zip","type":"application\/octet-strea m","size":2181661,"download":"https:\/\/github.com\/getgrav\/grav\/releases\/download\/0.9.29\/grav-update-v0.9.29.zip"},"grav":{"name":"grav-v0.9.29.zip","type":"application\/octet-stream","size":3400157,"download":"https:\/\/github.com\/getgrav\/grav\/releases\/download\/0.9.29\/grav-v0.9.29.zip"}},"url":"https:\/\/github.com\/getgrav\/grav\/releases\/tag\/0.9.29","changelog":{"0.9.29":{"date":"06\/22\/2015","content":"1. [](#new)
    * New and improved Regex-powered redirect and route alias logic
    * Added new `onBuildPagesInitialized` event for memory critical or time-consuming plugins
    * Added a `setSummary()` method for pages
2. [](#improved)
    * Improved  `MergeConfig()` logic for more control
    * Travis skeleton build trigger implemented
    * Set composer.json versions to stable versions where possible
    * Disabled `last_modified` and `etag` page headers by default (causing too much page caching)
3. [](#bugfix)
    * Preload classes during `bin\/gpm selfupgrade` to avoid issues with updated classes
    * Fix for directory relative _down_ links","content_html":"<ol>
<li><a href="#new"><\/a>
<ul>
<li>New and improved Regex-powered redirect and route alias logic<\/li>
<li>Added new <code>onBuildPagesInitialized<\/code> event for memory critical or time-consuming plugins<\/li>
<li>Added a <code>setSummary()<\/code> method for pages<\/li>
<\/ul><\/li>
<li><a href="#improved"><\/a>
<ul>
<li>Improved <code>MergeConfig()<\/code> logic for more control<\/li>
<li>Travis skeleton build trigger implemented<\/li>
<li>Set composer.json versions to stable versions where possible<\/li>
<li>Disabled <code>last_modified<\/code> and <code>etag<\/code> page headers by default (causing too much page caching)<\/li>
<\/ul><\/li>
<li><a href="#bugfix"><\/a>
<ul>
<li>Preload classes during <code>bin\/gpm selfupgrade<\/code> to avoid issues with updated classes<\/li>
<li>Fix for directory relative <em>down<\/em> links<\/li>
<\/ul><\/li>
<\/ol>"....

At first the curl.php would not run, because I had the following in php.ini:
----disable_functions = xxx, curl_exec, xxx ----
I have then removed curl_exec from the list and now the command outputs what has been already presented above:
----------```
$ php curl.php
{“version”:“0.9.29”,“date”:“2015-06-23T00:24:01Z”,“assets”:{“grav-upda te”:{“name”:“grav-update-v0.9.29.zip”,“type”:“application/octet-stream”,“size”:2181661,“download”:"https://github.com/getgrav/grav/releases/download/0.9.29/grav-update-v0.9.29.zip"},“grav”:{“name”:“grav-v0.9.29.zip”,“type”:“application/octet-stream”,“size”:3400157,“download”:“https://github.com/getgrav/grav/releases/download/0.9.29/grav-v0.9.29.zip”}},“url”:“https://github.com/getgrav/grav/releases/tag/0.9.29”,“changelog”:{“0.9.29”:{“date”:“06/22/2015”,“content”:"1.
* New and improved Regex-powered redirect and route alias logic
*

EDITED

  • Initial Rel ease<\/li> <\/ul><\/li> <\/ol>","content_plain":"Initial Release"}}} ----------```

    I also how now tried running “bin/gpm selfupgrade” and “php bin/gpm selfupgrade” but the same error is still in place.

Tot test if there is something more in my php.ini that could be a problem I just renamed it restarted PHP with defaults. And now I get:
-------$ bin/gpm selfupgrade Grav v0.9.29 is now available [release date: Tue Jun 23 00:24:01 2015]. You are currently using v0.9.28. Would you like to read the changelog before proceeding? [y|N] -------
I will now go through the php.ini enabling stuff line by line and will report back when does the problem start.

Progress, that output is fully expected :slight_smile:

It appear that besides the disabled curl_exec the other issue was that I had:
----allow_url_fopen = 0 ----
Now I can launch $ bin/gpm selfupgrade.

Perhaps this might be helpful for others in future: when I had disabled my php.ini entirely to test if problem lies in there, and then reenabled it entirely in order to disable individual things line by line, the GPM would run without giving an error. So you need to clear out cache in Grav!

Ok, thanks for diligently working through this with me. I hope that others will find this thread useful. Just glad you were able to resolve it :slight_smile:

And thank you for going through with this, and iainsgillis for the other suggestion how to deal with this! :slight_smile:

Thanks for letting me chime in. I’m just getting my feet wet with this, and the whole thread was most informative! Glad you’re back up and running, Makarei; rhukster, class act and great representative of the grav community.