Moved site is redirecting and erroring out on backend
Posted: Sat Mar 07, 2020 11:59 pm
I am running OC 3.0.3.2 and I moved a site that I had created under one domain (a testing domain) to another where I intend on using it. I made changes to the config and admin/config files, but it keeps directing me to the old domain name when I type in the new URL. Btw… I am on the same DNS server, just under a different account.
In addition, when trying to access the admin login I am getting this message.
Now, I checked in the d domain/storage/logs/openbay.log and there’s nothing in the log.
Then, I went to check domain /public_html/system/library/log.php and it is this…
This is the config.php file
<?php
admin/config.php file
In addition, when trying to access the admin login I am getting this message.
Code: Select all
Warning: fopen(/domain/storage/logs/openbay.log): failed to open stream: No such file or directory in /home/ domain /public_html/system/library/log.php on line 22Warning: fopen(/domain/storage/logs/error.log): failed to open stream: No such file or directory in /home/domain/public_html/system/library/log.php on line 22
Then, I went to check domain /public_html/system/library/log.php and it is this…
Code: Select all
<?php
/**
* @package OpenCart
* @author Daniel Kerr
* @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/)
* @license https://opensource.org/licenses/GPL-3.0
* @link https://www.opencart.com
*/
/**
* Log class
*/
class Log {
private $handle;
/**
* Constructor
*
* @param string $filename
*/
public function __construct($filename) {
$this->handle = fopen(DIR_LOGS . $filename, 'a');
}
/**
*
*
* @param string $message
*/
public function write($message) {
fwrite($this->handle, date('Y-m-d G:i:s') . ' - ' . print_r($message, true) . "\n");
}
/**
*
*
*/
public function __destruct() {
fclose($this->handle);
}
}
This is the config.php file
<?php
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://newdomain.com/');
// HTTPS
define('HTTPS_SERVER', 'https://newdomain.com/');
// DIR
define('DIR_APPLICATION', '/home/newdomain/public_html/catalog/');
define('DIR_SYSTEM', '/home/newdomain/public_html/system/');
define('DIR_IMAGE', '/home/newdomain/public_html/image/');
define('DIR_STORAGE', '/home/newdomain/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'dbname');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
Code: Select all
<?php
// HTTP
define('HTTP_SERVER', 'https://newdomain/admin/');
define('HTTP_CATALOG', 'https://newdomain.com/');
// HTTPS
define('HTTPS_SERVER', 'https://newdomain.com/admin/');
define('HTTPS_CATALOG', 'https://newdomain.com/');
// DIR
define('DIR_APPLICATION', '/home/newdomain/public_html/admin/');
define('DIR_SYSTEM', '/home/newdomain/public_html/system/');
define('DIR_IMAGE', '/home/newdomain/public_html/image/');
define('DIR_STORAGE', '/newdomain/storage/');
define('DIR_CATALOG', '/home/newdomain/public_html/catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'dbname');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
// OpenCart API
define('OPENCART_SERVER', 'https://www.opencart.com/');