|
Posted by AnrDaemon on 12/05/07 05:49
Greetings, bizt.
In reply to Your message dated Monday, December 3, 2007, 07:08:59,
> 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
And here is your error:
> include('PEAR/DB/DB.php');
It *SHOULD* be simple
include('DB.php');
if you have PEAR installed right. Otherwise PEAR::DB can't find and load it's
connectors and fails immediately at DB::connect().
> Btw Im using MySQL 5 so I understand that the prefix above in the DSN
> should be 'mysqli'.
You understand it wrong. Go to MySQL website and study the difference between
mysql and mysqli extensions. It is not a PHP related discussion.
> My script just stops at theline ..
> $conn = DB::connect($dsn);
As expected - PEAR::DB can't load proper connector.
--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>
[Back to original message]
|