Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Run CLI

Started by Muut Archive 11 years ago · 7 replies · 421 views
11 years ago

Hi,
I just installed Grav.

  1. I configured umask 0002
  2. I copied the grav folder to my server
  3. It shows the "You have installed Grav successfully" page
    4 Now I will run the CLI or GPM
    4.1. cd ~/grav
    4.2. bin/gpm

    bin/gpm: Permission denied.
    4.3. Configured 775 for those files
    4.4. bin/gpm selfupgrade
    X-Powered-By: PHP/5.6.2
    Content-type: text/html; charset=iso-8859-1

    Preparing to install vendor dependencies...

    Status: 404 Not Found
    X-Powered-By: PHP/5.6.2
    Content-type: text/html; charset=iso-8859-1

    No input file specified.
    No input file specified.

    PHP Warning: require_once(bin/../vendor/autoload.php): failed to open stream: No such file >or directory in bin/grav on line 17
    PHP Fatal error: require_once(): Failed opening required 'bin/../vendor/autoload.php' (include_path='.:/opt/RZphp55/includes') in bin/grav on line 17

What is wrong? What I have to do?

Thanks
iMaxxx

11 years ago

Or if I use
cd grav/
instead of
cd ~/grav/
I get the following when I call
bin/gpm selfupgrade

X-Powered-By: PHP/5.6.2
Content-type: text/html; charset=iso-8859-1

FATAL: Must be run from ROOT directory of Grav!

11 years ago

Are you running a CLI version of PHP from the console, or an FCGI version or something?

Some hosting environments need some 'tweaking' to ensure the correct version of PHP is running from the CLI. For example:

Crucial Hosting Guide

When you run php -v you should see a message about the version of PHP running along with confirmation that its the CLI version:

BASH
$ php -v
PHP 5.5.18 (cli) (built: Nov 19 2014 14:29:20)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
11 years ago
BASH

$ php -v
PHP 5.6.2 (cgi-fcgi) (built: Oct 16 2014 13:30:19)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
---
11 years ago

Well it cleary shows you are running cgi-fcgi version.

you might need to talk to your hosting provider if you don't know where the cli version is located.

11 years ago

What do I have to do when I know where it is located?

11 years ago

You really have to look for it. I generally do something like:

TXT
$ which php

This shows you where your current PHP is, then you can 'cd' to that directory and then ls php* to look for other PHP instances. Frankly if your not experienced in PHP, just send a message to your hosting provider, then can probably fix this for you. Just explain that your PHP version in the terminal, is the cgi-fcgi version and should be the cli version. Include the output of your php -v as that helps make it clearer.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1323 9 years ago
Archive · by Muut Archive, 9 years ago
2 920 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2924 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago