Hi there,
I am new to Grav and wanted to set up an environment on my PC to play around with it.
I’m using Windows 10, and I followed the following steps to install:
- Downloaded
Grav Core + Admin Plugin
and extracted it to my wwwroot folder - Installed PHP and added it to environment variables as per this article
php -v PHP 8.0.1 (cli) (built: Jan 5 2021 23:43:33) ( NTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.1, Copyright (c) Zend Technologies
- Added the .php mime type to my IIS site as type text/html
- Enabled mbstring in the php
php.ini-development
andphp.ini-production
files in C:\php - Created a “Hello World” script in an html page and browsed to it successfully on my browser
-
This is where the trouble starts
Tried to add a user to the admin plugin via command line as per this article
On cmd I browse to the grav-admin/bin directory and runphp plugin login new user
and I am greeted with this error:'mbstring' extension is not loaded. This is required for Grav to run correctly
- I also tried to browse to the …grav-admin\index.php page and I see this error:
PHP %s to run.', $ver, $req)); } if (PHP_SAPI === 'cli-server') { $symfony_server = stripos(getenv('_'), 'symfony') !== false || stripos($_SERVER['SERVER_SOFTWARE'], 'symfony ') !== false; if (!isset($_SERVER['PHP_CLI_ROUTER']) && !$symfony_server) { die("PHP webserver requires a router to run Grav, please use: php -S {$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']} system/router.php "); } } // Set timezone to default, falls back to system if php.ini not set date_default_timezone_set(@date_default_timezone_get()); // Set internal encoding. if (!\extension_loaded('mbstring')) { die("'mbstring' extension is not loaded. This is required for Grav to run correctly"); } @ini_set('default_charset', 'UTF-8'); mb_internal_encoding('UTF-8'); // Ensure vendor libraries exist $autoload = __DIR__ . '/vendor/autoload.php'; if (!is_file($autoload)) { die('Please run: bin/grav install'); } // Register the auto-loader. $loader = require $autoload; use Grav\Common\Grav; use RocketTheme\Toolbox\Event\Event; // Get the Grav instance $grav = Grav::instance( array( 'loader' => $loader ) ); // Process the page try { $grav->process(); } catch (\Error $e) { $grav->fireEvent('onFatalException', new Event(array('exception' => $e))); throw $e; } catch (\Exception $e) { $grav->fireEvent('onFatalException', new Event(array('exception' => $e))); throw $e; }
I’ve trolled through a few articles online and none of them really make sense, so I am hoping someone on here can help me? There was another topic like this on here, but the issue there seemed with the person’s php version (mine is v8.0.1).
This has really been a deterrent for me trying to see if Grav will be useful for me, I’m hoping that I can sort out the installation so that I can finally get to play around.
Thanks in advance,