Reputation: 179
I took complete backup of opencart from my web server with database.Now I want to install it on the localhost so that I can make changes at the code, and can test it locally.So I copied the folder into the root directory of local server.The made a new database for it.Then edit the config.php file it looks like this.
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/sillypunter/ocart/');
define('HTTP_CATALOG', 'http://localhost/sillypunter/ocart/')
// HTTPS
define('HTTPS_SERVER', 'http://localhost/sillypunter/ocart/');
// DIR
define('DIR_APPLICATION', 'sillypunter/ocart/catalog/');
define('DIR_SYSTEM', 'sillypunter/ocart/system/');
define('DIR_DATABASE', 'sillypunter/ocart/system/database/');
define('DIR_LANGUAGE', 'sillypunter/ocart/catalog/language/');
define('DIR_TEMPLATE', 'sillypunter/ocart/catalog/view/theme/');
define('DIR_CONFIG', 'sillypunter/ocart/system/config/');
define('DIR_IMAGE', 'sillypunter/ocart/image/');
define('DIR_CACHE', 'sillypunter/ocart/system/cache/');
define('DIR_DOWNLOAD', 'sillypunter/ocart/download/');
define('DIR_LOGS', 'sillypunter/ocart/system/logs/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'sp_user');
define('DB_PASSWORD', 'sp1234');
define('DB_DATABASE', 'sp_ocar');
define('DB_PREFIX', 'sp_');
?>
But on browser it is giving me server error 500.I'am using ubuntu 14.04,apache2, mysql and php. Please help me to solve this problem.
Upvotes: 0
Views: 1817
Reputation: 159
In the case of Windows, the config file should look like this:
<?php
// HTTP
define('HTTP_SERVER', 'http://<your host>/');
// HTTPS
define('HTTPS_SERVER', 'http://<your host>/');
// DIR
define('DIR_APPLICATION', 'C:/<path to your directory with files>/catalog/');
define('DIR_SYSTEM', 'C:/<path to your directory with files>/system/');
define('DIR_IMAGE', 'C:/<path to your directory with files>/image/');
define('DIR_STORAGE', DIR_SYSTEM . '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/');
Remember to replace <path to your directory with files>
and <your host>
.
Upvotes: 0
Reputation: 141
define('DIR_APPLICATION', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/catalog/'); define('DIR_SYSTEM', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/system/'); define('DIR_DATABASE', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/system/database/'); define('DIR_LANGUAGE', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/catalog/language/'); define('DIR_TEMPLATE', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/catalog/view/theme/'); define('DIR_CONFIG', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/system/config/'); define('DIR_IMAGE', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/image/'); define('DIR_CACHE', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/system/cache/'); define('DIR_DOWNLOAD', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/download/'); define('DIR_LOGS', $_SERVER['DOCUMENT_ROOT'].'sillypunter/ocart/system/logs/');
Upvotes: 2