Ho installato il negozio opencart su locahost, quindi ho caricato tutte le cose sull'hosting online e ho cambiato i percorsi nel file config.php nella cartella root opencart e nella cartella Admin.Pagina vuota su Opencart Admin Side
La parte anteriore funziona correttamente, ma il lato amministratore non funziona. Mostra solo una pagina bianca vuota.
Eseguo il debug del mio file Index.php posizionando l'eco in alcuni punti tramite i numeri di eco per verificare che si stia eseguendo fino a quel punto oppure no.
Stavo cercando di risolvere questo errore. Ho aggiornato il mio codice file qui riportato. Un cambiamento è il mio log ha recentemente generato questo errore -
PHP Fatal error: Call to a member function isLogged() on a non-object in /var/www/html/home/catalog/model/catalog/product.php on line 8
sto anche dando il codice per il mio Product.php
modo che dà errore in questa linea qui sotto - $ Controller-> dispatch ($ azione , nuova azione ('error/not_found'));
Ho anche incluso il mio file Index.php.
pagina My config.php nella cartella admin: -
<?php
define('HTTP_SERVER', 'http://domain/home/admin/');
define('HTTP_CATALOG', 'http://domain/home/');
// HTTPS
define('HTTPS_SERVER', 'http://domain/home/admin/');
define('HTTPS_CATALOG', 'http://domain/home/');
echo '1';
// DIR
define('DIR_APPLICATION', '/var/www/html/home/catalog/');
define('DIR_SYSTEM', '/var/www/html/home/system/');
define('DIR_DATABASE', '/var/www/html/home/system/database/');
define('DIR_LANGUAGE', '/var/www/html/home/admin/language/');
define('DIR_TEMPLATE', '/var/www/html/home/admin/view/template/');
define('DIR_CONFIG', '/var/www/html/home/system/config/');
define('DIR_IMAGE', '/var/www/html/home/image/');
define('DIR_CACHE', '/var/www/html/home/system/cache/');
define('DIR_DOWNLOAD', '/var/www/html/home/download/');
define('DIR_LOGS', '/var/www/html/home/system/logs/');
define('DIR_CATALOG', '/var/www/html/home/catalog/');
echo '2';
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'databasename');
define('DB_PREFIX', 'oc_');
echo '3';
?>
Indice .php Codice
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
?>
<?php
// Version
define('VERSION', '1.5.6');
// Configuration
if (file_exists('config.php')) {
require_once('config.php');
}
echo '4';
// Install
if (!defined('DIR_APPLICATION')) {
header('Location: ../install/index.php');
exit;
}
// Startup
require_once(DIR_SYSTEM . 'startup.php');
echo '5';
// Application Classes
require_once(DIR_SYSTEM . 'library/currency.php');
require_once(DIR_SYSTEM . 'library/user.php');
require_once(DIR_SYSTEM . 'library/weight.php');
require_once(DIR_SYSTEM . 'library/length.php');
echo '6';
// Registry
$registry = new Registry();
echo '7';
// Loader
$loader = new Loader($registry);
$registry->set('load', $loader);
echo '7';
// Config
$config = new Config();
$registry->set('config', $config);
echo '8';
// Database
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
$registry->set('db', $db);
echo '9';
// Settings
$query = $db->query("SELECT * FROM " . DB_PREFIX . "setting WHERE store_id = '0'");
echo '10';
foreach ($query->rows as $setting) {
if (!$setting['serialized']) {
$config->set($setting['key'], $setting['value']);
} else {
$config->set($setting['key'], unserialize($setting['value']));
}
}
echo '11';
// Url
$url = new Url(HTTP_SERVER, $config->get('config_secure') ? HTTPS_SERVER : HTTP_SERVER);
$registry->set('url', $url);
echo '12';
// Log
$log = new Log($config->get('config_error_filename'));
$registry->set('log', $log);
echo '13';
function error_handler($errno, $errstr, $errfile, $errline) {
global $log, $config;
switch ($errno) {
case E_NOTICE:
case E_USER_NOTICE:
$error = 'Notice';
break;
case E_WARNING:
case E_USER_WARNING:
$error = 'Warning';
break;
case E_ERROR:
case E_USER_ERROR:
$error = 'Fatal Error';
break;
default:
$error = 'Unknown';
break;
}
if ($config->get('config_error_display')) {
echo '<b>' . $error . '</b>: ' . $errstr . ' in <b>' . $errfile . '</b> on line <b>' . $errline . '</b>';
}
if ($config->get('config_error_log')) {
$log->write('PHP ' . $error . ': ' . $errstr . ' in ' . $errfile . ' on line ' . $errline);
}
return true;
}
echo '14';
// Error Handler
set_error_handler('error_handler');
// Request
$request = new Request();
$registry->set('request', $request);
// Response
$response = new Response();
$response->addHeader('Content-Type: text/html; charset=utf-8');
$registry->set('response', $response);
// Cache
$cache = new Cache();
$registry->set('cache', $cache);
// Session
$session = new Session();
$registry->set('session', $session);
// Language
$languages = array();
$query = $db->query("SELECT * FROM `" . DB_PREFIX . "language`");
foreach ($query->rows as $result) {
$languages[$result['code']] = $result;
}
$config->set('config_language_id', $languages[$config->get('config_admin_language')]['language_id']);
// Language
$language = new Language($languages[$config->get('config_admin_language')]['directory']);
$language->load($languages[$config->get('config_admin_language')]['filename']);
$registry->set('language', $language);
echo '15';
// Document
$registry->set('document', new Document());
// Currency
$registry->set('currency', new Currency($registry));
// Weight
$registry->set('weight', new Weight($registry));
// Length
$registry->set('length', new Length($registry));
// User
$registry->set('user', new User($registry));
//OpenBay Pro
$registry->set('openbay', new Openbay($registry));
$registry->set('play', new Play($registry));
$registry->set('ebay', new Ebay($registry));
$registry->set('amazon', new Amazon($registry));
$registry->set('amazonus', new Amazonus($registry));
// Front Controller
$controller = new Front($registry);
echo '16';
// Login
$controller->addPreAction(new Action('common/home/login'));
echo '17';
// Permission
$controller->addPreAction(new Action('common/home/permission'));
echo '18';
// Router
if (isset($request->get['route'])) {
$action = new Action($request->get['route']);
} else {
$action = new Action('common/home');
}
echo '19';
// Dispatch
$controller->dispatch($action, new Action('error/not_found'));
echo '20';
// Output
$response->output();
echo '21';
?>
Linea 8 a Linea 13 In Product.php un errore tale da venire
if ($this->customer->isLogged()) {
$customer_group_id = $this->customer->getCustomerGroupId();
} else {
$customer_group_id = $this->config->get('config_customer_group_id');
}
Questo schermo vuoto bianco appare solo sul lato Admin del mio sito OpenCart. Ho usato in precedenza opencart molte volte. Sto usando Digital Ocean VPS È questo problema di creazione che sto usando la prima volta e affrontando questo errore anche la prima volta –
L'errore che hai postato riguarda il front-end del negozio quindi non rilevante per la schermata vuota in admin. Assicurati di cancellare la cartella di sistema/libreria/cache. Se stai usando vQmod assicurati di svuotare la cartella vqcache. Se il problema persiste, vorrai esaminare i log degli errori del server web Apache per trovare le risposte. – billynoah
Inoltre, assicurati che la cartella del sistema/della libreria sia intatta e non manchi alcun file. – billynoah