Print Page | Close Window

DB Connection

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Spam Filter ISP Support
Forum Description: General support for Spam Filter ISP
URL: https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=3973
Printed Date: 04 November 2025 at 2:53pm


Topic: DB Connection
Posted By: Guests
Subject: DB Connection
Date Posted: 13 July 2004 at 3:03pm

Going on a post similar to C.Dargel I too am having a problem with the db_connect file but the error I get is "DB Error: extension not found" when I try to get in.

 require_once('DB.php');
 $db = DB::connect("mssql://".$user.":".$password."@".$host."/".$database."", array('persistent' => 1));
 if (DB::iserror($db)) die($db->getMessage());

My first question is am I supposed to have the file DB.php because I didn't see it in the zip file.

Is there something wrong with the coding of this page?




Replies:
Posted By: Guests
Date Posted: 13 July 2004 at 3:23pm

When using my usual way of connecting to my DB using the code below I get this error:

Fatal error: Call to a member function on a non-object in /homepages/17/d98859112/htdocs/mail-temp/authenticate.php on line 44

 

$databaseName = $database;
$db = mysql_connect($host, $user, $password) or
die ('I can’t connect to the database.');
mysql_select_db($databaseName,$db);



Posted By: Desperado
Date Posted: 13 July 2004 at 10:59pm

David,

I have never really worked with PHP ... only asp but I will try to look at the code if no-one has a "ready" answer.

Dan S.



Posted By: Guests
Date Posted: 14 July 2004 at 10:27am
I used to be in the same boat Dan but then I got a managed Unix Server and didn't have the choice but to learn PHP. Any help you can provide would be great.


Posted By: Sean
Date Posted: 16 July 2004 at 1:36pm

DB.php, is part of the PHP distribution. it is included with your install fo PHP. Now the questions are... to better help me help you out:

What OS?
What Version of PHP?
What type of Database, and version?



Posted By: Guests
Date Posted: 16 July 2004 at 4:03pm
What OS? UNIX
What Version of PHP? 4.3.6
What type of Database, and version? MySQL Version 3.23.49



Print Page | Close Window