summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-05 21:11:42 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-05 21:11:42 +0200
commitbd6116a63899c5efcf35e175b3db14b1f05c60a9 (patch)
tree30f8c8ac46877143919340891072f3efc62f03c9
parentd74e027614fd1d5209180800e97bb8a01e5d4acf (diff)
Replace localhost with 127.0.0.1 and remove the PDO::ERRMODE_SILENT option - it's the default anyway
-rw-r--r--system/database/drivers/pdo/pdo_driver.php1
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_4d_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_informix_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php2
10 files changed, 9 insertions, 10 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 26ad3831a..b36a3d927 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -114,7 +114,6 @@ class CI_DB_pdo_driver extends CI_DB {
*/
public function db_connect($persistent = FALSE)
{
- $this->options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_SILENT;
$this->options[PDO::ATTR_PERSISTENT] = $persistent;
// Connecting...
diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
index b2e905cd1..e287f5c63 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
@@ -61,7 +61,7 @@ class CI_DB_pdo_4d_driver extends CI_DB_pdo_driver {
if (empty($this->dsn))
{
- $this->dsn = '4D:host='.(empty($this->hostname) ? 'localhost' : $this->hostname);
+ $this->dsn = '4D:host='.(empty($this->hostname) ? '127.0.0.1' : $this->hostname);
empty($this->port) OR $this->dsn .= ';port='.$this->port;
empty($this->database) OR $this->dsn .= ';dbname='.$this->database;
diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
index e4fae5a18..05eeacfe6 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
@@ -64,7 +64,7 @@ class CI_DB_pdo_cubrid_driver extends CI_DB_pdo_driver {
if (empty($this->dsn))
{
- $this->dsn = 'cubrid:host='.(empty($this->hostname) ? 'localhost' : $this->hostname);
+ $this->dsn = 'cubrid:host='.(empty($this->hostname) ? '127.0.0.1' : $this->hostname);
empty($this->port) OR $this->dsn .= ';port='.$this->port;
empty($this->database) OR $this->dsn .= ';dbname='.$this->database;
diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
index c175f3025..832c03c96 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
@@ -92,7 +92,7 @@ class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver {
}
else
{
- $this->dsn .= 'HOSTNAME='.(empty($this->hostname) ? 'localhost;' : $this->hostname.';');
+ $this->dsn .= 'HOSTNAME='.(empty($this->hostname) ? '127.0.0.1;' : $this->hostname.';');
}
if (isset($this->PORT))
diff --git a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
index 11e1481f5..a3efc63dc 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
@@ -81,7 +81,7 @@ class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver {
}
else
{
- $this->dsn .= 'host='.(empty($this->hostname) ? 'localhost' : $this->hostname);
+ $this->dsn .= 'host='.(empty($this->hostname) ? '127.0.0.1' : $this->hostname);
}
if (isset($this->service))
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index cb0dbf01d..78afe246c 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -64,7 +64,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
if (empty($this->dsn))
{
- $this->dsn = 'mysql:host='.(empty($this->hostname) ? 'localhost' : $this->hostname);
+ $this->dsn = 'mysql:host='.(empty($this->hostname) ? '127.0.0.1' : $this->hostname);
empty($this->port) OR $this->dsn .= ';port='.$this->port;
empty($this->database) OR $this->dsn .= ';dbname='.$this->database;
diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
index 53f73436d..56ec1bce1 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
@@ -76,7 +76,7 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver {
}
else
{
- $this->dsn .= '//'.(empty($this->hostname) ? 'localhost' : $this->hostname)
+ $this->dsn .= '//'.(empty($this->hostname) ? '127.0.0.1' : $this->hostname)
.(empty($this->port) ? '' : ':'.$this->port).'/';
empty($this->database) OR $this->dsn .= $this->database;
diff --git a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
index 1fd8f14b4..392754ff7 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
@@ -100,7 +100,7 @@ class CI_DB_pdo_odbc_driver extends CI_DB_pdo_driver {
}
else
{
- $this->dsn .= 'HOSTNAME='.(empty($this->hostname) ? 'localhost;' : $this->hostname.';');
+ $this->dsn .= 'HOSTNAME='.(empty($this->hostname) ? '127.0.0.1;' : $this->hostname.';');
}
if (isset($this->PORT))
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
index 5907de97c..9a476f143 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
@@ -58,7 +58,7 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
if (empty($this->dsn))
{
- $this->dsn = 'pgsql:host='.(empty($this->hostname) ? 'localhost' : $this->hostname);
+ $this->dsn = 'pgsql:host='.(empty($this->hostname) ? '127.0.0.1' : $this->hostname);
empty($this->port) OR $this->dsn .= ';port='.$this->port;
empty($this->database) OR $this->dsn .= ';dbname='.$this->database;
diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
index 7cebae9e6..f125b8f50 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
@@ -60,7 +60,7 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver {
if (empty($this->dsn))
{
- $this->dsn = 'sqlsrv:Server='.(empty($this->hostname) ? 'localhost' : $this->hostname);
+ $this->dsn = 'sqlsrv:Server='.(empty($this->hostname) ? '127.0.0.1' : $this->hostname);
empty($this->port) OR $this->dsn .= ','.$this->port;
empty($this->database) OR $this->dsn .= ';Database='.$this->database;