Post by peterprentice » Wed Oct 25, 2017 9:36 am

Hi All,
I'm hoping can help me as I have a client that needs me to look at their site so what I was trying to do was create a localhost version so that I could investigate and try modifications/setups. So I downloaded the latest version a followed all of the setup steps but when I tried to enter the store by typing "localhost/workgears" I ended up with this error:

Fatal error: Uncaught Exception: Error: Table 'workgear_db.oc_session' doesn't exist<br />Error No: 1146<br />SELECT `data` FROM `oc_session` WHERE session_id = '1b3971f9302e5eeebdf7bf4ca0' AND expire > 1508894035 in C:\xampp\htdocs\workgears\system\library\db\mysqli.php:40 Stack trace: #0 C:\xampp\htdocs\workgears\system\library\db.php(45): DB\MySQLi->query('SELECT `data` F...') #1 C:\xampp\htdocs\workgears\system\library\session\db.php(21): DB->query('SELECT `data` F...') #2 C:\xampp\htdocs\workgears\system\library\session.php(72): Session\DB->read('1b3971f9302e5ee...') #3 C:\xampp\htdocs\workgears\system\framework.php(106): Session->start('1b3971f9302e5ee...') #4 C:\xampp\htdocs\workgears\system\startup.php(104): require_once('C:\\xampp\\htdocs...') #5 C:\xampp\htdocs\workgears\index.php(19): start('catalog') #6 {main} thrown in C:\xampp\htdocs\workgears\system\library\db\mysqli.php on line 40

Fatal error: Uncaught Exception: Error: Table 'workgear_db.oc_session' doesn't exist<br />Error No: 1146<br />REPLACE INTO `oc_session` SET session_id = '1b3971f9302e5eeebdf7bf4ca0', `data` = '[]', expire = '2017-10-25 01:37:55' in C:\xampp\htdocs\workgears\system\library\db\mysqli.php:40 Stack trace: #0 C:\xampp\htdocs\workgears\system\library\db.php(45): DB\MySQLi->query('REPLACE INTO `o...') #1 C:\xampp\htdocs\workgears\system\library\session\db.php(32): DB->query('REPLACE INTO `o...') #2 C:\xampp\htdocs\workgears\system\library\session.php(81): Session\DB->write('1b3971f9302e5ee...', Array) #3 [internal function]: Session->close() #4 {main} thrown in C:\xampp\htdocs\workgears\system\library\db\mysqli.php on line 40
I believe I have setup the config.php and admin/config.php files correctly see below
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/workgears/');

// HTTPS
define('HTTPS_SERVER', 'http://localhost/workgears/');

// DIR
define('DIR_APPLICATION', 'C:/xampp/htdocs/workgears/catalog/');
define('DIR_SYSTEM', 'C:/xampp/htdocs/workgears/system/');
define('DIR_IMAGE', 'C:/xampp/htdocs/workgears/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/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'peterp');
define('DB_PASSWORD', 'march181949');
define('DB_DATABASE', 'workgear_db');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');

admin/config.php file looks like this
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/workgears/admin/');
define('HTTP_CATALOG', 'http://localhost/workgears/');

// HTTPS
define('HTTPS_SERVER', 'http://localhost/workgears/admin/');
define('HTTPS_CATALOG', 'http://localhost/workgears/');

// DIR
define('DIR_APPLICATION', 'C:/xampp/htdocs/workgears/admin/');
define('DIR_SYSTEM', 'C:/xampp/htdocs/workgears/system/');
define('DIR_IMAGE', 'C:/xampp/htdocs/workgears/image/');
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
define('DIR_CATALOG', 'C:/xampp/htdocs/workgears/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', 'peterp');
define('DB_PASSWORD', 'march181949');
define('DB_DATABASE', 'workgear_db');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');

// OpenCart API
define('OPENCART_SERVER', 'https://www.opencart.com/');
I have moved the install directory and also the storage directory
So I think I have done everthing that is required but with no success
so any help will be greatly appreciated
Best regards,
Peterprentice

Newbie

Posts

Joined
Mon Oct 23, 2017 2:31 pm

Post by straightlight » Fri Oct 27, 2017 8:38 pm

The problem is with the database. You have incomplete created tables since the installation. In this case; the session table.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 7 guests