[phpOpenTracker-devel] [Bug #3521] PhpOpenTracker-Database connectivity problem

[email protected] Thu, 25 May 2006 16:18:28 +0400 (GST)
Newsgroups gmane.comp.web.phpopentracker.devel
Message-ID <[email protected]>
Bug #3521, was updated on 2005-Mar-03 15:45
Here is a current snapshot of the bug.

Project: phpOpenTracker
Category: None
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: sandeep
Assigned to : none
Summary: PhpOpenTracker-Database connectivity problem

Details: After confidurating when I try to use the functions to start keeping logs of page access it gives "phpOpenTracker Error: Could not connect to database." this problem in the very first line of the page.Have checked port username password host  still not figure out where this problem occuring.Please help.........

Follow-Ups:

Date: 2006-May-25 16:18
By: stone_age

Comment:
Hi,

I'm using phpOpenTracker for my website also.

Had the same prob to connect to my OracleExpress db. Finally solved the prod .

Here are the steps I used hope that this may help in a way.

in the file phpOpenTracker.php in the conf directory
// Name of the database to use.
// $PHPOPENTRACKER_CONFIGURATION['db_database'] = 'phpOpenTracker';
$PHPOPENTRACKER_CONFIGURATION['db_database'] = '(DESCRIPTION = (ADDRESS =	(PROTOCOL = TCP)(HOST = <webserver_ip>)(PORT = <db_port>))(CONNECT_DATA = (SID = <DB>)))';

other settings are ok for the others.


for debugging purposes:

just insert those lines in oci8.php if using oracle db else put them in other files in DB directory
     if (!$this->connection) {
		$err=OCIError();
	//function parse_line($array){
   		$line = "";
		foreach($err AS $key => $value)
		{
		   if(is_array($value)){
			   $value = "(". parse_line($value) . ")";
		   }
		   $line = $line . "," . $key . ":" . $value . "";           
		}
	  	$line = substr($line, 1);
      return phpOpenTracker::handleError(
        'Could not connect to database.'.$line,
        E_USER_ERROR
      );
    }

this should display the complete error no just
Could not connect to database.


-------------------------------------------------------

For detailed info, follow this link:
http://developer.berlios.de/bugs/?func=detailbug&bug_id=3521&group_id=2025