Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - DB Connection
  FAQ FAQ  Forum Search   Register Register  Login Login

DB Connection

 Post Reply Post Reply
Author
David Kittell View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote David Kittell Quote  Post ReplyReply Direct Link To This Post Topic: DB Connection
    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?

Back to Top
David Kittell View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote David Kittell Quote  Post ReplyReply Direct Link To This Post 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);

Back to Top
Desperado View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 January 2005
Location: United States
Status: Offline
Points: 1143
Post Options Post Options   Thanks (0) Thanks(0)   Quote Desperado Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
David Kittell View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote David Kittell Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Sean View Drop Down
Groupie
Groupie
Avatar

Joined: 21 February 2005
Location: United States
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sean Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
David Kittell View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote David Kittell Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.359 seconds.