mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
fix for #1917 - related to using port with mysql server
This commit is contained in:
@@ -185,13 +185,15 @@ class e_db_mysql
|
|||||||
$this->mySQLPrefix = $mySQLPrefix;
|
$this->mySQLPrefix = $mySQLPrefix;
|
||||||
$this->mySQLerror = false;
|
$this->mySQLerror = false;
|
||||||
|
|
||||||
if(strpos($mySQLserver,':')!==false)
|
|
||||||
{
|
|
||||||
list($this->mySQLserver,$this->mySQLport) = explode(':',$mySQLserver,2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->pdo)
|
if($this->pdo)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(strpos($mySQLserver,':')!==false)
|
||||||
|
{
|
||||||
|
list($this->mySQLserver,$this->mySQLport) = explode(':',$mySQLserver,2);
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=".$this->mySQLport, $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=".$this->mySQLport, $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||||
|
Reference in New Issue
Block a user