Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not possible to install plugins anymore! #939

Closed
axel-rank opened this issue Jan 19, 2017 · 19 comments
Closed

not possible to install plugins anymore! #939

axel-rank opened this issue Jan 19, 2017 · 19 comments

Comments

@axel-rank
Copy link

Since grav 1.1.13/1.1.14 and admin-plugin 1.2.8/1.2.9 it's not possible to install plugins via admin anymore.
Uninstall work. Install fails. Though it shows success at first, if you go back to plugins it isn't listed as installed, on your server there is only an empty folder...

@rhukster
Copy link
Member

Is there ever a failure actually displayed? If so what does it say? What server are you running on? Can you provide some details?

@rhukster
Copy link
Member

Also is this JUST admin, or CLI via bin/gpm also? What about themes? Is it only plugins? We made some changes to the Folder::move() function that is about only the only thing I can think of that could cause this, but the logic only has an extra failsafe if the first method fails.

@rhukster
Copy link
Member

Also, can you try backing-up/saving the system/src/Grav/Common/Filesystem/Folder.php file and replacing with the one from Grav v1.1.12. Does it allow you to install plugins again???

https://github.com/getgrav/grav/blob/1.1.12/system/src/Grav/Common/Filesystem/Folder.php

@joshnorwich
Copy link

joshnorwich commented Jan 20, 2017

Similarly with Grav v1.1.12 and Admin v1.2.9 I cannot seem to update plugins through the Admin Dashboard. It empties the folder (namely gantry5 in this case) but does not put anything back in it's place. Also it keeps prompting me to upgrade to v1.1.14, which it says is successful but the version does not change.

I will try both tasks via bin/gpm and see if it works.

@joshnorwich
Copy link

bin/gpm was able to perform both tasks.

@axel-rank
Copy link
Author

axel-rank commented Jan 20, 2017

think i got it.
i changed php open_basedir string setting to none --> now it's working again!
php2
though it did work before with standard setting:
php

so admin installs are working again, but cli isn't (didn't work before either):
cli
i'm on debian/apache, php 7.0.14

@axel-rank axel-rank reopened this Jan 20, 2017
@flaviocopes
Copy link
Contributor

flaviocopes commented Jan 20, 2017

Is PHP in your CLI path? If you type php -v what happens?

@axel-rank
Copy link
Author

cli_

@axel-rank
Copy link
Author

axel-rank commented Jan 20, 2017

going to my webroot to /etc:
cli2,
same output in grav folder.
so cli can't work, because grav needs 5.5.9 ???

@flaviocopes
Copy link
Contributor

  1. you need php to be the command to use. You can create a symbolic link from php5 to php so it will work, as the bin/gpm script calls #!/usr/bin/env php (calls the php executable).

  2. you need to update the PHP version available in the command line to be at least PHP 5.5.9. If you're on a hosted site, they should provide you a way to use a newer version of PHP.

@axel-rank
Copy link
Author

axel-rank commented Jan 20, 2017

ok, spoke to my hoster, told me there are diffrent php versions to use under /bin folder.
and yes, there is php 5.6.
bildschirmfoto zu 2017-01-20_16-27-31

But how to use in grav cli now?
How to create a symbolic link?

@flaviocopes
Copy link
Contributor

@axel-rank
Copy link
Author

guess i have no permissions to do that:
bildschirmfoto zu 2017-01-20_16-33-15

@flaviocopes
Copy link
Contributor

You should ask your hosting provider how to do that. Or temporary change this line https://github.com/getgrav/grav/blob/develop/bin/gpm#L1 to #!/usr/bin/env php5.6

@axel-rank
Copy link
Author

axel-rank commented Jan 20, 2017

i think i had a wrong path. now the symlink is created.
link is in grav/bin folder?
bildschirmfoto zu 2017-01-20_17-32-39,
bildschirmfoto zu 2017-01-20_17-32-58
but where is bash_profile on my host, can find only bash_history?
bildschirmfoto zu 2017-01-20_17-36-50
changing line to bin/env php5.6 doesn't help. php -v still shows command not found,
bin/gpm not working -->no such file or directory

think i stop now. it's getting too complicated. spent a lot of time already. at least admin-plugin installs work now, so i don't need cli at all. in other cases i use ftp.

@rhukster
Copy link
Member

We've been working on the same issue reported by another user and it turned out that switching from auto to fopen in the for the GPM Check Method in system.yaml resolved it.

So we need to work out why Curl is not working for some people.

@rhukster
Copy link
Member

Was related to curl + open_basedir and a 303 redirect. We've fixed on the GPM side, and also in Grav in case this comes up again - getgrav/grav#1267 (comment)

You won't need to update anything, should just work now as we return a supported 302 redirect now.

getgrav/grav#1267 (comment)

@axel-rank
Copy link
Author

Yes, setting back open_basedir back to standard --> updates/installs work again. Great!
Finally found a way cli working now:
Created a symlink from php5.6 to root server php
bildschirmfoto zu 2017-01-22_16-29-23,
than going to grav folder and calling: /php bin/gpm
bildschirmfoto zu 2017-01-22_16-31-21
yep!!!
maybe something for the docs.

@beamaria
Copy link

beamaria commented Mar 1, 2020

Same problem for me yesterday! I had everything working properly with "remote Fetch method" set to "Auto", but suddenly I was unable to install new plugins and I had to switch from "Auto" to "fopen"- This solved the problem, but I can't understand why the site worked for nearly two months and then- without any change in settings or in server- I had the same error and behaviour using different browsers (Safari, Chrome)
switching to cURL doesn't solve the problem
Grav version: 1.6.21
Admin panel: 1.7.0
php: 7.2.22
Linux server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants