Welcome Guest, Not a member yet? Register   Sign In
Database Class : connecting to an SSL MySQL server
#6

[eluser]Unknown[/eluser]
I made this changes and it works:

// return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database, $this->port);
$mysqli = mysqli_init();

$mysqli->ssl_set('/etc/ssl/mysql/client-key.pem', '/etc/ssl/mysql/client-cert.pem', '/etc/ssl/mysql/ca-cert.pem', NULL, NULL);
$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5);

@$mysqli->real_connect($$this->hostname, $this->username, $this->password, $this->database);

return $mysqli;

Environment:
Codeigniter 2.1.3
PHP 5.3.10

database.php:
$db['default']['dbdriver'] = 'mysqli';


Messages In This Thread
Database Class : connecting to an SSL MySQL server - by El Forum - 01-13-2009, 03:06 PM
Database Class : connecting to an SSL MySQL server - by El Forum - 12-07-2009, 03:45 PM
Database Class : connecting to an SSL MySQL server - by El Forum - 12-07-2009, 04:29 PM
Database Class : connecting to an SSL MySQL server - by El Forum - 12-08-2009, 11:55 AM
Database Class : connecting to an SSL MySQL server - by El Forum - 12-08-2009, 04:46 PM
Database Class : connecting to an SSL MySQL server - by El Forum - 12-29-2012, 05:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB