Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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 · 700 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 Marcel, 5 days ago
0 85 5 days ago
Support · by JakobDB, 6 days ago
1 91 6 days ago
Support · by ramenos, 7 days ago
3 103 6 days ago
Support · by gravinator, 2 weeks ago
3 229 1 week ago
Support · by Roger Parkinson, 2 weeks ago
3 308 2 weeks ago