Post by Sidney-Melop » Mon Jul 24, 2017 10:01 pm

I am trying to run my site on localhost but after changing the config files and index.php I refresh the page and see these errors:

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in C:\xampp\htdocs\safetyelite\vqmod\vqmod.php on line 247

Code: Select all

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\safetyelite\system\database\mysql.php on line 6

My config files and index.php look like this now and I don't know what else to do so I hope you can help:

<?php
// 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', '');
?>

if (!defined('DIR_APPLICATION')) {
    header('Location: /http://localhost/safetyelite/install/index.php');
    exit;
}

// VirtualQMOD
require_once('vqmod/vqmod.php');
$vqmod = new VQMod();

Attachments

opecart_error.jpg

opecart_error.jpg (189.5 KiB) Viewed 369 times

opecart_error.jpg

opecart_error.jpg (189.5 KiB) Viewed 369 times

opecart_error.jpg

opecart_error.jpg (189.5 KiB) Viewed 369 times


Newbie

Posts

Joined
Mon Jul 24, 2017 9:53 pm

Post by GilesM » Tue Jul 25, 2017 3:12 am

You either need to run an older copy of PHP on your localhost (should be a setting in XAMPS) or update your copy of VQMOD to the latest version.

Regards.

PGM

Don't pay for simple mods
My free modules: Filter resets in admin, Add extra flat shipping, Improved Admin Product Search and Canned Messages.
My site uses (free): Modification refresh button, Additional Alert Email Fix, TLT Structured Data
My site uses (paid): Journal2, Restrict catalog by customer group


New member

Posts

Joined
Mon May 29, 2017 8:28 pm

Post by victorj » Tue Jul 25, 2017 3:20 am

unless you pointed your domain to your localhost, you need to change your config files.
replace safetyelite.co.za with localhost
access your store through localhost ie http://localhost

Depending on your opencart version
look in folder system/database en locate a file named mmysqli.php
if its not there upload attached file

in config files change

Code: Select all

define('DB_DRIVER', 'mysql');
to

Code: Select all

define('DB_DRIVER', 'mmysqli');

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.
https://123-deurrubbers.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by Sidney-Melop » Tue Jul 25, 2017 3:07 pm

I just updated my vqmod folder to the very latest version I found on github, but when I refreshed the page it gave me this error:

Fatal error: Cannot instantiate abstract class VQMod in C:\xampp\htdocs\safetyelite\index.php on line 17

Have no idea about how to go from here

Newbie

Posts

Joined
Mon Jul 24, 2017 9:53 pm
Who is online

Users browsing this forum: No registered users and 27 guests