CMS MADE SIMPLE FORGE

Gbook

 

[#11042] No entry in the guest book possible

avatar
Created By: Eric (etofi)
Date Submitted: Fri May 27 03:48:39 -0400 2016

Assigned To: Jos (josvd)
Version: 2.2.1
CMSMS Version: 2.1.3
Severity: Critical
Resolution: None
State: Closed
Summary:
No entry in the guest book possible
Detailed Description:
I can't  make an entry in the guest book and the import of entries isn't work,
too.
It always appears the following error message


Could not initialize b8.
Error message: b8_storage_mysqli: Unknown MySQL server host 'localhost:3306' (0)


History

Comments
avatar
Date: 2016-05-30 03:51
Posted By: Eric (etofi)

I found the problem in the storage_mysqli.php.

You use 
storage_mysqli.php

$this->_connection = (mysqli_connect($this->config['host'],
$this->config['user'], $this->config['pass'], $this->config['database']));

But in a shared hosting environment it will be better to use

$this->_connection = (mysqli_connect($this->config['host'],
$this->config['user'], $this->config['pass'], $this->config['database'],
$this->config['port']));

then it works.

I tested it with
$this->_connection = (mysqli_connect('localhost', $this->config['user'],
$this->config['pass'], $this->config['database'], '3306'));
      
avatar
Date: 2016-08-20 05:41
Posted By: Rolf (rolf1)

I can confirm the error on local install MAMP for testing.

In frontend after posting:
"Could not initialize b8.
Error message: b8_storage_mysqli: Connection refused"

Error Log:
[19-Aug-2016 20:38:38 Europe/Amsterdam] PHP Warning:  mysqli_connect():
(HY000/2002): Connection refused in
/WWW/trunk/modules/Gbook/lib/b8/storage/storage_mysqli.php on line 116

I can NOT confirm the fix posted by the OP!

Fixing it seems more a job for the author of the B8 software anyway.
I checked latest release (b8-0.6.1.tar.gz) and the code in line 116 is unchanged
to the one in the current Gbook release.
      
avatar
Date: 2016-09-21 10:52
Posted By: Eric (etofi)

I solved the Problem.

in the CMS Made Simple disable the Port config, the  it works.

#$config['db_port'] = 3306;
      
Updates

Updated: 2017-07-26 16:41
resolution_id: 10 => 5
state: Open => Closed

Updated: 2016-05-30 04:52
resolution_id: 5 => 10

Updated: 2016-05-30 03:51
resolution_id: => 5