Reply to Re: PEAR newbie trying to user PEAR DB and falling at the first hurdle

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация