Re: Trying to install Log
| From: | Stan Lemon | Date: | Mon, 16 Jun 2003 02:52:52 +0000 |
| Subject: | Re: Trying to install Log | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151615@lists.php.net to get a copy of this message | ||
I'm using the mysql driver, so $server = "mysql"; I am also very confident that mysql support is provided correctly through php because up until recently I've used mysql_....() functions and never experienced a problem.
I have no problem connecting, it's just the query() function doesn't want to go, it keeps telling me that no function exists.
I tried the code you wrote and it didn't produce any errors.
The following code is available at: http://beta.insyderhomielc.com/dbtest.php
<.?php
// Set the include path for when I'm working with PEAR
ini_set("include_path","/usr/share/pear/");
// Grab DB for me
include("/usr/share/pear/DB.php");
// My connection info that I use everywhere is in here
include("functions/connect.mn.php");
// Now connect me
$db = DB::connect("$server://$user:$password@$host/$database");
// Query to the db
$query = "SELECT * FROM ps_config WHERE site=1";
$result = $db->query($query) or die("I could not connect to the PageSite configuration table in the SQL database.");
// Store the results in an associative array
$config = $result->fetchRow(DB_FETCHMODE_ASSOC);
?.>
If you need to see my php configuration go to: http://beta.insyderhomielc.com/php.php
I'll be honest, I am clueless. I don't have a single problem on my harddrive.
This is consistent though, I had the same problem on another CPanel based server.
- Stan