Posted by bizt on 12/03/07 04:08
Hi,
Ive just installed PEAR on my local machine and all is well, updated
the include_path to point to my PEAR dir. So, when I just try to make
a simple connection like so the script just seems to stop but no error
messsages. I do get error messages normally (ie. when I can a method
from an object that doesnt actually exist) as I have set
display_errors = On in php.ini.
Anyway, heres my code:
<?php
include('PEAR/DB/DB.php');
$dsn = "mysqli://root:password@localhost/testdb";
$conn = DB::connect($dsn);
if (DB::isError($conn)) {
print("Unable to connect to DB!!");
die($conn->getMessage());
}
?>
Btw Im using MySQL 5 so I understand that the prefix above in the DSN
should be 'mysqli'. My script just stops at theline ..
$conn = DB::connect($dsn);
... with no error messages or any indicated that there was a problem
until I place a ..
print 'Hello world!';
... after it to see where the script ends - nothing is printed. Any
ideas why this might be or how to gather some more information? Thanks
Burnsy
[Back to original message]
|