I did the following to run an open cart site from the live server to localhost:
On both config.php I changed my files to the following:
<?php
error_reporting(E_ALL);
// HTTP
define('HTTP_SERVER', 'http://safetyelite.co.za/');
define('HTTP_IMAGE', 'http://safetyelite.co.za/image/');
define('HTTP_ADMIN', 'http://safetyelite.co.za/admin/');
// HTTPS
define('HTTPS_SERVER', 'http://safetyelite.co.za/');
define('HTTPS_IMAGE', 'http://safetyelite.co.za/image/');
// DIR
define('DIR_APPLICATION', 'C:/xampp/htdocs/safetyelite');
define('DIR_SYSTEM', 'C:/xampp/htdocs/safetyelite/system/');
define('DIR_DATABASE', 'C:/xampp/htdocs/safetyelite/system/database/');
define('DIR_LANGUAGE', 'C:/xampp/htdocs/safetyelite/admin/language/');
define('DIR_TEMPLATE', 'C:/xampp/htdocs/safetyelite/admin/view/template/');
define('DIR_CONFIG', 'C:/xampp/htdocs/safetyelite/system/config/');
define('DIR_IMAGE', 'C:/xampp/htdocs/safetyelite/image/');
define('DIR_CACHE', 'C:/xampp/htdocs/safetyelite/system/cache/');
define('DIR_DOWNLOAD', 'C:/xampp/htdocs/safetyelite/download/');
define('DIR_LOGS', 'C:/xampp/htdocs/safetyelite/system/logs/');
define('DIR_CATALOG', 'C:/xampp/htdocs/safetyelite/catalog/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'safetyelite');
define('DB_PREFIX', '');
?>
I also went to my index.php and changed the directory under install to this:
// Install
if (!defined('DIR_APPLICATION')) {
header('Location: /http://localhost/safetyelite/install/index.php');
exit;
}
// VirtualQMOD
require_once('/http://localhost/safetyelite/vqmod/vqmod.php');
When I load the page I get this error:
How can I load open cart on localhost? I anything I could possibly be missing.
Please help
require_once need the exact php file name as argument-
require_once('/http://localhost/safetyelite/vqmod/vqmod.php');
thus you have to change this line to -
require_once('./vqmod/vqmod.php');
You didn't give a propper path to require_once;
Changerequire_once('/http://localhost/safetyelite/vqmod/vqmod.php');
torequire_once('vqmod/vqmod.php');