Author: dgoette
Date: Thu Feb 12 06:28:16 2009
New Revision: 39564
URL:
http://svn.reactos.org/svn/reactos?rev=39564&view=rev
Log:
add support for different port numbers while connecting to MySQL. patch by Mariusz
Przybylski
Modified:
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
Modified:
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php [iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/connect.db.php [iso-8859-1] Thu Feb 12
06:28:16 2009
@@ -21,9 +21,10 @@
// Database:
$db_host = 'localhost';
-$db_user = 'user';
-$db_pass = 'pass';
-$db_name = 'roscms';
+$db_user = 'lev-db';
+$db_pass = 'DangerGround';
+$db_name = 'realroscms';
+$db_port = 3306;
// vars are unset in DBConnection class
// !!! so be sure to use DBConnection or unset(..) yourself
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php [iso-8859-1]
Thu Feb 12 06:28:16 2009
@@ -41,13 +41,14 @@
include_once(ROSCMS_PATH.'connect.db.php');
try {
- parent::__construct('mysql:dbname='.$db_name.';host='.$db_host,
$db_user, $db_pass);
+
parent::__construct('mysql:dbname='.$db_name.';host='.$db_host.';port='.$db_port,
$db_user, $db_pass);
// unset loaded db config
unset($GLOBALS['db_name']);
unset($GLOBALS['db_host']);
unset($GLOBALS['db_user']);
unset($GLOBALS['db_pass']);
+ unset($GLOBALS['db_port']);
// show errors as warning, and use our own statement class
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);