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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Error compressing web download and open in Localhost

admin first-time theme

Solved by Harald Schneider View solution

Started by Iñigo 6 years ago · 1 replies · 533 views
6 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

6 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 Thomas, 1 week ago
2 57 15 hours ago
Support · by Anna, 3 days ago
2 65 18 hours ago
Support · by Justin Young, 18 hours ago
1 33 18 hours ago
Support · by Duc , 1 week ago
2 68 5 days ago
Support · by Colin Hume, 1 week ago
2 60 6 days ago