Page 1 of 1

MySQL Problem

Posted: Tue Aug 12, 2003 6:18 pm
by Rafee
Hi,

I'm a relatively new PHP programmer, and I just started working with MySQL databases. WHen I try to connect to a database, I get this error:

Warning: driver initialization failed in C:\indigoperl\apache\htdocs\index.php on line 3
Couldn't open database

This is the code for my PHP file: (pretty simple because I'm just starting it)

<?php

$dbh = dba_open("./data/icewolf","w","db3") or die("Couldn't open database");

?>

The PHP file is located in C:\indigoperl\apache\htdocs and the MySQL directory for my databases is C:\mysql\data Am I looking for the wrong directory maybe when I call the dba_open function? I have no clue :P Can someone please help me?

Posted: Tue Aug 12, 2003 9:19 pm
by JAM
I would recommend mysql_connect() instead.

If i'm not mistaking, dba_open is filebased in a different form than mysql.