Bin/gpm not working!

This is the error is got when I click on the gpm in bin.

“FATAL: Must be run from ROOT directory of Grav!logout”

[Process completed]


You are clicking it directly in the bin folder, so it doesn’t work. You must open your console/terminal, go to the root of your grav installation (where the README, LICENSE and index.php are) and call it from there with gpm bin/gpm. That’s where it works.

Sorry, typed it wrong: bin/gpm index

Yes you should be in the root of Grav not in the bin/ directory itself.

I ALWAYS get the “FATAL” error. Even from the Grav root.

Strange, what OS you’re running?

It is supposed to be run from the command line, from the root of the installation, like this: bin/gpm <command>

Not 100% sure on the OS. It’s on a 1and1 shared host. I have access to the command line which is where I run this.

I’ve seen other reports from users having trouble with 1and1. It’s a discount hosting service and seems to have quite a restrictive environment.

Can you please confirm if all the PHP requirements are met

You can do this by using:

$ php -i | more

And paging through the list of output.

The requirements 1and1 is missing are xdebug, xcache, and apcu. Would those affect the cli?

Those are optional modules, so you can skip them although xcache & apcu are recommended for optimal performance

Hi - could you solve the problem? I’m on 1und1 to and have the same problem … I have to use $php5.4 bin/gpm to use php5.4 … without this php4.4.9 is the system standard … is there a way to use gpm on 1un1? Thanks a lot!

Now I tried to install manually … it doesn’t work ==> first he cant find the Swift.php - I have copy the file from swift to Swift … but now I have an Internal server error when I go to /admin … ;( ==> is there someone who get Grav run on 1und1?

You can set the php5.4 as your default PHP by adding it to your path in front of the standard location. Although not identical you can see how to do it for Siteground hosting here:

SiteGround Hosting Guide

done - but still the same problem => website is working, but bin/gpm, bin/grav say Fatal Error and the admin plugin give me an Internal Error …

Here the screen: 2015-09-27_0730

@honingmann, your clearly running a CGI/FCGI version of PHP in your screenshot. You need to be running a CLI version. type php -v to see…

php -i | more shows php 4.4 on 1and1 despite having selected 5.5 for the domain I am testing.

Changing the top line of the scripts like grav from
#!/usr/bin/env php
#!/usr/bin/env php5.5

has resolved many issues, but not the FATAL must run from ROOT message. Maybe I need to find more places to change to 5.5…

Also, 1and1 required .htaccess to uncomment the line

RewriteBase /

in order to not get a server 500 error when accessing any page but the root page.

Be careful: the domain specific php settings on your 1und admin panel don’t effect the CLI version you are running on your terminal ssh connection. You need to call something like “/usr/bin/php5.5-cli” to get the cli version to work properly. Or you could define an alias for it via .bashrc…

for example instead of bin/gpm selfupgrade you need to type /usr/bin/php5.5-cli bin/gpm selfupgrade

To solve the FATAL: Must be run from ROOT directory issue you might need to prefix bin/grav commands with php-cli. So the full command would be php-cli bin/grav clear-cache for example.