Complete newbie to PHP here...programmed before but never with a net language.
I'm working on my first PHP project to get some experience in using the language instead of just reading about it. MySQL is part of the project. The book I read about PHP used PearDB to handle its DB interactions, and I'd like to follow suit.
The server I'm on is sporting PHP 4.0.6, and MySQL 3.23.32. Pear doesn't seem to be part of the package (this is server space from a company, so I don't have any control over versions and the like). So I went out and grabbed the most recent versions of Pear and Pear DB I could that didn't require a higher version of PHP, Pear 1.2.1 and PearDB 1.5, and put them in a folder together on my webspace.
Here's the problem: when I try to connect via PearDB, I get a message saying the variable I'm using to catch DB::connect is 'Undefined class name'.
I'm pretty sure I got the connect syntax right: $db = DB::connect('mysql://username:password@mysql.domain.com/databasename');
Result: Undefined class name 'db' in <directory> on line <line>
I have a require_once line before this call right after my <?php tag to bring in DB.php which seems fine, no errors.
I'm able to connect to this same MySQL database using the same data through PHP's own calls (mysql_connect, mysql_query, etc.).