Answer the question
In order to leave comments, you need to log in
Fatal Error Woops/Run in WordPress how to fix?
Good afternoon! For the first time I encountered such a problem when transferring the site to a new hosting and domain. Previously, this was not the case, I did everything according to the rules, changed the links in the database to the necessary ones, imported, uploaded all the files, edited config.php, that is, there were no questions about this in the error. First, after installation, it threw on the WP download page after fixing this error and reinstalling, the following error began to pop up:
Fatal error: Uncaught Error: Class 'Whoops\Run' not found in /home/psg2q17vvphs/public_html/remote-how/wp-content/themes/know-how/lib/boot.php:59 Stack trace: #0 /home/psg2q17vvphs/public_html/remote-how/wp-content/themes/know-how/functions.php(3): include() #1 /home/psg2q17vvphs/public_html/remote-how/wp-settings.php(426): include('/home/psg2q17vv...') #2 /home/psg2q17vvphs/public_html/remote-how/wp-config.php(89): require_once('/home/psg2q17vv...') #3 /home/psg2q17vvphs/public_html/remote-how/wp-load.php(37): require_once('/home/psg2q17vv...') #4 /home/psg2q17vvphs/public_html/remote-how/wp-login.php(12): require('/home/psg2q17vv...') #5 {main} thrown in /home/psg2q17vvphs/public_html/remote-how/wp-content/themes/know-how/lib/boot.php on line 59
<?php
/**
* Bootstrap framework dependencies & helpers
*/
require __DIR__ . '/../vendor/autoload.php';
//require_once __DIR__ . '/autoload.php';
function isProduction()
{
return (!isStaging() || isLocalhost());
}
function isStaging()
{
return !isLocalhost();
}
function isLocalhost()
{
return apply_filters('is_localhost', $_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['HTTP_HOST'] == 'virtual.movecloser.pl');
}
function isLocal()
{
return isLocalhost();
}
function useWebpackDevServer(){
//return false;
return isLocal();
}
function vd($p)
{
array_map('var_dump', $p);
}
function dd(...$p)
{
array_map('var_dump', $p);
die();
}
function pr($arr)
{
echo '<pre>';
print_r($arr);
echo '</pre>';
}
function prd($arr)
{
die(pr($arr));
}
if (isLocal()) {
error_reporting(E_ALL & ~(E_NOTICE | E_WARNING));
}
$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
//date_default_timezone_set('UTC');
<?php
function framework_autoload($class_name)
{
$filename = __DIR__ . '/' . str_replace('\\', '/', ucwords($class_name)) . '.php';;
if (file_exists($filename)) {
include $filename;
}
}
spl_autoload_register('framework_autoload');
{
"name": "maciek/domwaluty",
"authors": [
{
"name": "partyka1",
"email": "[email protected]"
}
],
"require": {
"filp/whoops": "^2.1"
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question