Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007058TestLinkDatabase Postgrespublic2015-04-14 16:152015-04-16 08:28
Reporterwinfriedd 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformLinuxOSSuse Linux Enterprise ServerOS Version12
Product Version1.9.13 (2015 #1) 
Fixed in Version 
Summary0007058: Patch needed to install TestLink on Postgres db that uses Unix-domain socket
DescriptionThe Postgres database on Suse Enterprise Server communicates by default via a Unix-domain socket.

The postgres driver code in third_party/adodb/drivers/adodb-postgres64.inc.php tries to connect to the postgresql database with connection string "host='localhost' user='<testlink_db_user_name>' password='<testlink_db_user_pwd>' dbname='<testlink_db_name>'" .

When specifying the host= parameter, the connection is setup via tcp/ip. To connect via a domain socket, the host parameter must be omitted. So I needed the following hack to install and use testlink:

--- adodb-postgres64.inc.php.org 2015-04-14 18:10:00.909754260 +0200
+++ adodb-postgres64.inc.php 2015-04-14 18:13:39.913763647 +0200
@@ -694,7 +694,8 @@
 
                                $str .= str_repeat(' ',$ncnt);
                        }
- $this->_connectionID = pg_connect($str);
+ $domain_sock_str = preg_replace('/host=\'localhost\'/', '', $str);
+ $this->_connectionID = pg_connect($domain_sock_str);
                }
                if ($this->_connectionID === false) return false;
                $this->Execute("set datestyle='ISO'");
Steps To ReproduceTry to install TestLink 1.9.13 on a Postgres database that communicates via a Unix-domain socket.
TagsNo tags attached.
Database (MySQL,Postgres,etc)Postgresql 9.3
BrowserFirefox 36.0
PHP Version5.5.14
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0023085)
fman (administrator)
2015-04-14 16:39

OK
but this is not going to be added (yet) to stable code base, because it's patch to third party component
(0023096)
winfriedd (reporter)
2015-04-16 08:28

You shouldn't add the above patch. It's just a hack to get my situation working. When applying the above patch, connecting to a psql daemon that uses a tcp/ip socket won't work anymore.

I think the install web page where you select the database type should have an option to indicate if the database is communicating via a domain socket.

- Issue History
Date Modified Username Field Change
2015-04-14 16:15 winfriedd New Issue
2015-04-14 16:39 fman Note Added: 0023085
2015-04-16 08:28 winfriedd Note Added: 0023096



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker