opencart can not connect mysql database

January 23, 2015 2.3k views

I move my shop form share hosting to DO vps (Ubuntu LAMP on 14.04)
import database to "new database name";
config file as below:

<?php
// HTTP
define('HTTPSERVER', 'http://my vps ip/');
define('HTTP
IMAGE', 'http://my vps ip/image/');
define('HTTP_ADMIN', 'http://my vps ip/admin/');

// HTTPS
define('HTTPSSERVER', 'http://my vps ip/');
define('HTTPS
IMAGE', 'http://my vps ip/image/');

// DIR
define('DIRAPPLICATION', '/var/www/html/catalog/');
define('DIR
SYSTEM', '/var/www/html/system/');
define('DIRDATABASE', '/var/www/html/system/database/');
define('DIR
LANGUAGE', '/var/www/html/catalog/language/');
define('DIRTEMPLATE', '/var/www/html/catalog/view/theme/');
define('DIR
CONFIG', '/var/www/html/system/config/');
define('DIRIMAGE', '/var/www/html/image/');
define('DIR
CACHE', '/var/www/html/system/cache/');
define('DIRDOWNLOAD', '/var/www/html/download/');
define('DIR
LOGS', '/var/www/html/system/logs/');

define('DBDRIVER', 'mysql');
define('DB
HOSTNAME', 'localhost');
define('DBUSERNAME', 'root');
define('DB
PASSWORD', 'use mysql password');
define('DBDATABASE', 'new database name');
define('DB
PREFIX', 'de');

but the site not work,only show blank page.
anyone can help?

Many thanks

1 comment
  • When the blank page is displayed are you seeing any errors recorded in your Apache log files in /var/log/apache2/

Be the first one to answer this question.