LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-04-2008, 07:41 AM   #1
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Rep: Reputation: 15
PEAR in XAMPP


Hello, I am trying to connect to a database using the following PEAR syntax:

include('db_login.php');
require_once('DB.php');

# $db_username, $db_password, $db_host, and $db_database are all specified # in db_login.php, which is fine
$connection = DB::connect("mysql://$db_username:$db_password@db_host/$db_database");

if(DB::isError($connection))
{
die("Could not connecto to the database: <br />" . DB::errorMessage($connection));
}

MySQL and Apache were both running before trying out this script.
I did this earlier with regular php fine. Does anyone see what the problem is? Do I need to specify a path for my require_once statement? I've verified my syntax and the return values of the PEAR functions.


By the way, currently my php files are in htdocs. If I wanted to put them in a subfolder what configuration files do I need to change? Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xampp on linux bill_linux Linux - Server 1 10-03-2007 04:30 AM
Installing PEAR on a system which is configured '--without pear' swiftguy121 Linux - Software 1 07-10-2007 07:45 PM
install Pear Net/SMTP, Pear Log and Pear DB modules cccc Debian 0 02-26-2007 08:33 AM
xampp charnel Programming 0 07-15-2005 07:14 AM
Xampp problems eantoranz Linux - Software 0 08-23-2004 08:18 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration