Hello,
I've been trying to fix this problem for about 2-4 days now, i've searched on google,php site, mysql site and have tried basically everything i've found which could of some help.
The problem is when i use a script to conncet to the mysql database it says "could not find driver" the script is
<?php
$dsn = '
mysql: host = localhost;
dbname = 01;
';
$user = 'root';
$password = '';
try
{
$dbh = new PDO($dsn, $user, $password, array(PDO::ATTR_AUTOCOMMIT => true));
}
catch (PDOException $e)
{
echo('Connection Failed: ' . $e -> getMessage());
}
?>
I have checked the php info and it said the PDO is enabled with mysql, i have even checked the php config file to see if it is enabled there and it is.
Please help me i don't want to buy hosting just to fix this as it's a waste of money if i don't do anything on it for a few weeks cause i can sometimes get side-tracked off the work.
I am absolutly sure it's nothing to do with the script i just included it just to show you what is causing the PDO error, please anything that could possible help fix the problem, even if you think i've already tried it xD
Thanks for all your help in advance ;)
Edited 1 time(s). Last edit at 08/12/2008 06:57PM by Jazz.