Closed rocandante closed 8 years ago
Check if you have openssl php extension enabled, that is required
// Djamil Legato // From iPhone //
On Dec 5, 2015, at 18:24, Juan David Cardona notifications@github.com wrote:
Hi, I'm trying grav on my server. Apparently everything works fine but when I navigate in the admin repeatedly receive the message: cannot connect to the GPM. What does it mean? Am I missing something in the setup or configuration?
— Reply to this email directly or view it on GitHub.
I'm getting the same symptoms. According to /admin/info, I have OpenSSL support enabled with library version "OpenSSL 1.0.1f 6 Jan 2014". I started with the Notepad skeleton.
Do you get the same error from the command line gpm
command as the admin? Do you have any firewall in place? is your bin/gpm
file set with executable permissions?
From ls -l
, my permissions are:
-rwxrwxr-x 1 root www-data 1691 Dec 7 19:17 gpm
The command line gpm
command works fine. Running bin/gpm list
does not give the message. I don't believe I have a firewall in place. I do have UFW firewall running with the following configuration:
To Action From
-- ------ ----
22 ALLOW Anywhere
80/tcp ALLOW Anywhere
1622/tcp ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
1622/tcp (v6) ALLOW Anywhere (v6)
Can you try bin/gpm index
command [not list
] and see if you get the plugins/themes listed without errors?
bin/gpm index
runs without any warnings/errors. Successfully lists plugins and themes then provides some messages on how to install.
Thanks, just making sure it's isolated to admin.
It's kind of strange because Admin shares the same methods that are used by bin/gpm
.
Can you confirm you are running the same PHP on both web and cli ?
Running php -v
from the command line as root gives:
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
On the Configuration/Info page, the first heading is "PHP Version 5.5.9-1ubuntu4.14." I agree it's pretty weird. Are there any Admin interface actions that won't work if it really isn't able to access gpm?
The error "cannot connect to the GPM" is specific to accessing the GPM::$grav
object that has all the data regarding Grav's updates. However there is no distinction between Admin and CLI, they both instantiate the same GPM
class.
If you go in Plugins
and Add
[/admin/plugins/install
], do you get the whole list of plugins available for installation?
Also perhaps you can try editing the file getgrav/grav/blob/develop/system/src/Grav/Common/GPM/GPM.php#L46 and throw a proper error (ie, var_dump($e); die;
), in case it's failing there.
So, if I try to add a plugin (or theme), I get ErrorException (E_ERROR)
: Call to a member function filter() on a non-object. It's happening in plugins/admin/classes/admin.php lin 455:
{
$gpm = $this->gpm();
if (!$gpm) {
return;
}
return $local ? $gpm->getInstalledPlugins() : $gpm->getRepositoryPlugins()->filter(function (
$package,
$slug
Does that provide any insight, or should I try modifying GPM.php?
Edit: @rocandante, do you get the same error? I don't want to hijack your issue if we had similar initial symptoms but a different root cause.
~~That error is not related, it's calling a method that is in Grav and hasn't been released yet, we need to get that out asap. The fact that you can list the plugins for installation means you are accessing GPM, it is only failing to get the updates for Grav itself and not the Themes or Plugins.~~
Actually that filter
is supposed to work at this stage, even with Grav not released yet, so that means from admin you cannot access any of the GPM, not just Grav updates.
Please, edit the GPM.php
file and try throwing an error, there must be something in there that your server doesn't like.
Sorry for the hand-holding. In that exception catch block, if I try var_dump($e)
, I only get a white page back. I tried turning on errors with ini_set('display_errors', 1); error_reporting(E_ALL);
but that doesn't seem to have any effect. Is there somewhere in Grav that's hiding all PHP errors?
I also tried throwing an exception and making sure error display was on, but it just pops up a message bubble with the exception text.
I tried moving to the core+admin release, and I no longer receive the message. It seems to have something to do with the Notepad skeleton.
That's pretty odd. I tried downloading the current notepad skeleton and tested GPM. All worked fine. I'll close this for now, please reopen if the issue reoccurs.
Hello. I am receiving the same error message. I did a clean install on VPS. Then checked out my GIT repo and started receiving this message.
PHP has all curl and openssl installed? http://learn.getgrav.org/basics/requirements#php-requirements
Hi, I've got the same issue (cannot connect to GPM, exception on the filter() function when trying to add plugins) with latest Grav + Admin package (downloaded today). Windows 7 with XAMPP V3.2.2 installed
@cravussin the PHP requirements are matched?
Yes PHP 5.6.15
I mean curl
, openssl
, zip support http://learn.getgrav.org/basics/requirements#php-requirements
Yes all requirements are met. Actually, OpenSSL was missing at first, I activated it in php.ini then restarted the apache server.
Are plugins installed fine with the command-line utility? The problem is just in the admin, or also from there?
I'm not under Cygwin so I cannot use the CLI. Is there another way to install a plugin?
You can still download a plugin from http://getgrav.org/downloads/plugins, unzip and move the folder under user/plugins
, e.g. user/plugins/form/
I suspect I might been having permission issues, reinstalling from scratch right now
Okay, so reinstalling XAMPP + Grav using only user permissions changed nothing, still the same issue.
I managed to install the instagram plugin manually.
I had a similar issue. Setting the permissions right and adding the folder grav folder in ubuntu to www-data solved it for me.
I've installed XAMP as a user so everyhing in htdocs is writable. I think it's the Admin plugin.
You should try installing GitBash, then trying the command line tools:
> /path/to/php.exe bin/gpm index
From the root of your Grav install. I doubt its GPM itself, or Grav Admin as many people have no problems. 99% sure it's a config/setup issue on your end.
I'll try again on my Mac later today and let you know.
Envoyé depuis mon iPhone
Le 23 déc. 2015 à 16:33, Andy Miller notifications@github.com a écrit :
You should try installing GitBash, then trying the command line tools:
/path/to/php.exe bin/gpm index From the root of your Grav install. I doubt its GPM itself, or Grav Admin as many people have no problems. 99% sure it's a config/setup issue on your end.
— Reply to this email directly or view it on GitHub.
So it works flawlessly on my mac with MAMP 3.5. So it must be a Windows XAMPP vanilla configuration issue I suppose.
Most likely it's a missing PHP module (openssl, curl) or could be permissions, but that is less likely on windows.
I'll try with MAMP for Windows today
Same issue with MAMP 3.5 for windows. There must be a problem between the win32 ports of apache / php and the Admin plugin.
Works fine on:
This problem occurred on a new Grav site I just set up. It was fixed with a simple chown -R www-data:www-data /var/www/html/www.example.com
I had the same issue on my CentOS server and the cause was that SELinux was enabled and it blocked the execution of gpm. On Cent you can disable SELinux with sudo setenforce Permissive
. After that, i didn't get that error anymore. If someone is interested in reading about SELinux, go here. Link to the issue here on github
We've added more informative errors that should help you with this going forward.
I'm getting this error, too. Fresh Ubuntu 14.04 install, fresh install of Grav and the admin plugin. OpenSSL is enabled, curl is enabled, and permissions are configured. Any guidance on where to look for the source of the problem would be appreciated.
Is it possible you are behind a proxy?
The other thing to check is that curl and openssl are actually enabled in PHP for the CLI version:
$ php -i | grep curl
$ php -i | grep openssl
I'm assuming your resting bin/gpm
from the command line. Best to try there first. Also what exactly si the error you are getting?
I think you put the finger on the cause of my issue. I was having this problem at work where my station is behind a proxy.
Is there a way to configure gpm to go through a ntlmv2 authenticated proxy?
Le 10 janv. 2016 à 06:44, Andy Miller notifications@github.com a écrit :
Is it possible you are behind a proxy?
— Reply to this email directly or view it on GitHub.
@rhukster Solved it. It ended up being an ownership issue after all with the www-data
user in Ubuntu server. I had run the permissions configuration script on the Troubleshooting page, but I still needed to perform a chown -R...
after installing some plugins manually. Thanks again for your help!
No problem @Gorcenski , glad you got it sorted.
@cravussin check this comment out about how to set up some environment variables so Curl can use Proxy: https://github.com/getgrav/grav/issues/359#issuecomment-148369451
@rhukster cool thanks for the tip!
I'm using xampp in mac to have a local test, The admin page pops up a bubble when: turn on the openssl : internal sever error turn off the openssl : Cannot connect to GPM //php -i | grep openssl
Configure Command => '/Library/Caches/com.apple.xbs/Binaries/apache_mod_php/apache_mod_php-101~18/Objects/php/configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--sysconfdir=/private/etc' '--with-libdir=lib' '--enable-cli' '--with-iconv=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.Internal.sdk/usr' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/Library/Server/Web/Config/php' '--with-libxml-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.Internal.sdk/usr' '--with-openssl=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.Internal.sdk/usr/local openssl
You certainly do need openssl turned on.
if you get an internal server error, then there's probably something missing in your openssl setup. The best way to find out what, is to look at your web server logs.
Quick question, is there a particular reason you are using xampp on a mac? The usual suspects are MAMP or the built-in Apache with homebrew. I've outlined detailed steps on using homebrew on a mac: https://getgrav.org/blog/mac-os-x-apache-setup-multiple-php-versions
I strongly recommend this approach if you are tech-savvy, else MAMP is a solid and reliable way and 'just works'.
Helo, after upgrading apache and using mod_ruid, the plugin and theme menu throw an error "Cannot connect to the GPM", I echo in Response.php and got error SSL peer certificate or SSH remote key was not OK, When I added this CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, there were no more error. But I think this is not a good solution, because when I upgrade, those line will be overwritten. What should I do?
I think your ssl library is out of date. Our cert is perfectly valid.
Cheers!
Andy Miller http://trilbymedia.com
On Aug 26, 2016, 21:33 -0600, arieedzig notifications@github.com, wrote:
Helo, after upgrading apache and using mod_ruid, the plugin and theme menu throw an error "Cannot connect to the GPM", I echo in Response.php and got error SSL peer certificate or SSH remote key was not OK, When I added this CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, there were no more error. But I think this is not a good solution, because when I upgrade, those line will be overwritten. What should I do?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/getgrav/grav/issues/505#issuecomment-242893085), or mute the thread (https://github.com/notifications/unsubscribe-auth/ABCNGazHvMVKsNkPi9Vtwuz0iOogOxp-ks5qj7AegaJpZM4GvkUZ).
@arieedzig I have actually updated our Cert with one from LetsEncrypt, let me know if your issue remains??
Hi, I'm trying grav on my server. Apparently everything works fine but when I navigate in the admin repeatedly receive the message: cannot connect to the GPM. What does it mean? Am I missing something in the setup or configuration?