Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsZymic Free Web HostingDatabases & MySQL right
  Reply to this topic Start new topic
left right
EssenceOfStupid
post Nov 3 2009, 07:47 AM
Post #1


Newbie
*

Group: Members
Posts: 2
Joined: 3-November 09
Member No.: 116,665



I recently wrote a script and I am attempting to connect to a database using PDO. It seems that I can't connect, as I'm getting a database error:

"could not find driver"

I'm guessing that the PDO Driver isn't available. Is it possible to get it enabled, or is there any type of work around? Any information would be appreciated. I've searched the forums and it seems as if PDO was enabled in 2008, but I can't find any posts regarding it.

Here's some of my PHP code, with all the sensitive information edited out, for reference:

CODE

try{
$hostname = 'localhost';
$username = 'asdf'; //
$password = 'fdsa';
$dbname = "test"
$dbh = new PDO("mysql:host=$hostname;dbname=$dbnamehere", $username, $password);

$sql = "SELECT * FROM warmap";

}
catch(PDOException $e) {
echo $e->getMessage(); // this is where the error message is thrown.
}




Go to the top of the page 
 
  + Quote Post
sbu
post Nov 3 2009, 08:37 PM
Post #2


Newbie
*

Group: Members
Posts: 1
Joined: 3-November 09
Member No.: 116,779



PHP 5.3 and mysqlnd (?)
You need the IP (!) of the Mysql-host.
...I'm searching for my host-IP since half an hour... smile.gif
Go to the top of the page 
 
  + Quote Post
EssenceOfStupid
post Nov 5 2009, 03:06 AM
Post #3


Newbie
*

Group: Members
Posts: 2
Joined: 3-November 09
Member No.: 116,665



QUOTE(sbu @ Nov 3 2009, 08:37 PM) *
PHP 5.3 and mysqlnd (?)
You need the IP (!) of the Mysql-host.
...I'm searching for my host-IP since half an hour... smile.gif


The host IP is just localhost


Any admins have any information about PDO? It would be greatly appreciated.

Thanks.
Go to the top of the page 
 
  + Quote Post
Ed
post Nov 5 2009, 06:27 AM
Post #4


Outrageously Uber Ninja
*******

Group: Administrators
Posts: 2,529
Joined: 11-March 07
From: UK
Member No.: 9



PDO MySQL won't make any appearance soon due to technical requirements.
Go to the top of the page 
 
  + Quote Post
 Reply to this topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 22nd November 2009 - 06:00 AM