Post by stamboulbazaar » Sun Aug 17, 2014 2:34 pm

Hi Everyone,

Thank you for your help and communication.

I have upgraded my VPS PHP to 5.5. After that, I have began to use MySQLi.

I have seen this error somewheres of my web site. Homepage, comments, dashboard, cart,.... So more function are not working...
ERROR is that: Warning: mysqli::close(): Couldn't fetch mysqli in /home/......./public_html/eks/system/database/mysqli.php on line 59
My web site: stamboulbazaar.com, You can see error under page.

And I installed new clean Opencart to check error. And Yes, same error is in clean opencart.

Original web site: http://stamboulbazaar.com
Clean Opencart: http://stamboulbazaar.com/eks

Please help me for that problem.

Thank you very much


Posts

Joined
Sat May 05, 2012 9:22 pm

Post by Reemon » Sun Aug 17, 2014 9:14 pm

I believe that the problem is in system/database/mysqli.php, there is something like:

Code: Select all

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();
}
but I think there should be this:

Code: Select all

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

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

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

public function __destruct() {
        if($this->link) {
	      $this->link->close();
        }
}

New member

Posts

Joined
Fri Mar 07, 2014 6:11 pm
Who is online

Users browsing this forum: No registered users and 27 guests