Post by sodamhall » Wed Sep 09, 2015 6:40 am

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/database/mysql.php on line 6 Notice: Error: Table 'cybermobilephon.oc_setting' doesn't exist
Error No: 1146
SELECT * FROM oc_setting WHERE store_id = '0' in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/database/mysql.php on line 50

Newbie

Posts

Joined
Tue Aug 25, 2015 4:09 pm

Post by IP_CAM » Wed Sep 09, 2015 6:42 am

in BOTH of your config.php files, change:
// DB
define('DB_DRIVER', 'mysql');
to:
// DB
define('DB_DRIVER', 'mysqli');
and that should do it.
Ernie
bigmax.ch/shop/

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sodamhall » Wed Sep 16, 2015 1:50 am

I now get this error - Parse error: syntax error, unexpected 'DB_DRIVER' (T_STRING) in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/config.php on line 21

Newbie

Posts

Joined
Tue Aug 25, 2015 4:09 pm

Post by sodamhall » Wed Sep 16, 2015 1:58 am

I fixed that error now I get - Fatal error: Uncaught exception 'ErrorException' with message 'Error: Table 'cybermobilephon.oc_store' doesn't exist
Error No: 1146
SELECT * FROM oc_store WHERE REPLACE(`url`, 'www.', '') = 'http://cybermobilephones.co.uk/'' in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/database/mysqli.php:41 Stack trace: #0 /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/library/db.php(20): DBMySQLi->query('SELECT * FROM o...') #1 /customers/8/9/6/cybermobilephones.co.uk/httpd.www/index.php(47): DB->query('SELECT * FROM o...') #2 {main} thrown in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/database/mysqli.php on line 41

Newbie

Posts

Joined
Tue Aug 25, 2015 4:09 pm

Post by IP_CAM » Wed Sep 16, 2015 6:37 am

Download a MySqli-Connector File and install it:
http://www.opencart.com/index.php?route ... rch=MySqli
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sodamhall » Wed Sep 16, 2015 10:20 am

I now get this - Fatal error: Class 'DBmysql_i' not found in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/library/db.php on line 13

Newbie

Posts

Joined
Tue Aug 25, 2015 4:09 pm

Post by IP_CAM » Wed Sep 16, 2015 11:07 am

COPY THIS:

Code: Select all

<?php 
final class DBMySQLi { 
	private $link; 

	public function __construct($hostname, $username, $password, $database) { 
		$this->link = new mysqli($hostname, $username, $password, $database); 
	
		if (mysqli_connect_error()) { 
			throw new ErrorException('Error: Could not make a database link (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); 
		} 
	
		$this->link->set_charset("utf8"); 
	} 

	public function query($sql) { 
		$query = $this->link->query($sql); 
	
		if (!$this->link->errno) { 
			if (isset($query->num_rows)) { 
				$data = array(); 
	
				while ($row = $query->fetch_assoc()) { 
					$data[] = $row; 
				} 
	
				$result = new stdClass(); 
				$result->num_rows = $query->num_rows; 
				$result->row = isset($data[0]) ? $data[0] : array(); 
				$result->rows = $data; 
	
				unset($data); 
	
				$query->close(); 
	
				return $result; 
	
			} else { 
				return true; 
			} 
	
		} else { 
			throw new ErrorException('Error: ' . $this->link->error . '<br />Error No: ' . $this->link->errno . '<br />' . $sql); 
			exit(); 
		} 
	} 

	public function escape($value) { 
		return $this->link->real_escape_string($value); 
	} 

	public function countAffected() { 
		return $this->link->affected_rows; 
	} 

	public function getLastId() { 
		return $this->link->insert_id; 
	} 

	public function __destruct() { 
		$this->link->close(); 
	} 
} 
?>
AND SAVE IT, correctly, (as UTF-8 File without BOM ), by use of a DECENT File Editor, like NOTEPAD++,
and WITHOUT ANY SPACES, before or after anything (WHITESPACE), copied/pasted,
AS: mysqli.php FILE!
Then, place it in your /shop/system/database/ Directory!
---
Then, rewrite your BOTH config.php files from:

Code: Select all

// DB
define('DB_DRIVER', 'mysql');
to:

Code: Select all

// DB
define('DB_DRIVER', 'mysqli');
and test it again.

Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sodamhall » Wed Sep 23, 2015 5:17 am

I now get this error:
Fatal error: Uncaught exception 'ErrorException' with message 'Error: Table 'cybermobilephon.oc_store' doesn't exist
Error No: 1146
SELECT * FROM oc_store WHERE REPLACE(`url`, 'www.', '') = 'http://cybermobilephones.co.uk/'' in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/database/mysqli.php:42 Stack trace: #0 /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/library/db.php(20): DBMySQLi->query('SELECT * FROM o...') #1 /customers/8/9/6/cybermobilephones.co.uk/httpd.www/index.php(47): DB->query('SELECT * FROM o...') #2 {main} thrown in /customers/8/9/6/cybermobilephones.co.uk/httpd.www/system/database/mysqli.php on line 42

Newbie

Posts

Joined
Tue Aug 25, 2015 4:09 pm
Who is online

Users browsing this forum: No registered users and 4 guests