Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Error compressing web download and open in Localhost

admin first-time theme

Solved by Harald Schneider View solution

Started by Iñigo 7 years ago · 1 replies · 840 views
7 years ago

I get this error, after compressing my website and decompressing in Localhost.

PHP %s to run.', $ver, $req)); } if (PHP_SAPI === 'cli-server' && !isset($_SERVER['PHP_CLI_ROUTER'])) { die("PHP webserver requires a router to run Grav, please use:

php -S {$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']} system/router.php

"); } // 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; // 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 mbstring loaded if (!\extension_loaded('mbstring')) { die("'mbstring' extension is not loaded. This is required for Grav to run correctly"); } mb_internal_encoding('UTF-8'); // 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; }

Captura|690x147

For what is this?

How can I solve it?

Thanks

7 years ago Solution

If you compress a Grav Site, make sure that hidden files (e.g. .htaccess) are included in the archive. You are on the secure side, if you use Tar instead of Zip.

Compress:
tar -cvzf archive.tgz path_to_website

Uncompress:

BASH
cd target_path
tar -xvzf archive.tgz
last edited 02/16/20 by Harald Schneider

Suggested topics

Topic Participants Replies Views Activity
Support · by Anna, 4 days ago
1 93 4 days ago
Support · by Anna, 3 weeks ago
1 265 3 weeks ago
Support · by webmasterodp, 1 month ago
4 380 1 month ago
Support · by nwhitfield, 1 month ago
2 351 1 month ago
Support · by stell, 2 months ago
5 657 1 month ago