Hi,
I have been getting the error listed below on a site of mine:
"
The script being used is (blocked out usernames and passwords :
---------------------
Any info on what may be causing this? I did a "php -i | grep -i pdo" command in terminal and came back with this:
------------------------------
Regards,
Mike C.
I have been getting the error listed below on a site of mine:
"
Code:
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /home/vortexdn/public_html/tardis/navigation.php:9 Stack trace: #0 /home/vortexdn/public_html/tardis/navigation.php(9): PDO->__construct('DB_DRIVER:host=...', 'DB_USER', 'DB_PASS') #1 {main} thrown in /home/vortexdn/public_html/tardis/navigation.php on line 9"
Code:
"<?php
$DB_DRIVER="mysql";
$DB_HOST="localhost";
$DB_PORT="3306";
$DB_NAME="-";
$DB_USER="-";
$DB_PASS="-";
$pdo = new PDO(DB_DRIVER.':host='.DB_HOST.';port='.DB_PORT.';dbname='.DB_NAME, DB_USER, DB_PASS);
$stmt = $pdo -> prepare ("SELECT * FROM `rezzers` WHERE `ObjectName` = :param");
$stmt -> execute(array(":param" => $myParam));
$res = $stmt -> fetchAll(PDO::FETCH_ASSOC);
foreach($res as $row) {echo $row['myField']."^";}
?>"
Any info on what may be causing this? I did a "php -i | grep -i pdo" command in terminal and came back with this:
Code:
Configure Command => './configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr' '--with-litespeed'
PDO
PDO support => enabled
PDO drivers => sqlite, sqlite2, mysql
pdo_mysql
PDO Driver for MySQL => enabled
pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
Regards,
Mike C.