Tuesday, November 9, 2010

PHP Fatal error: Class 'PDO' not found

When using SQLite with Php for the first time, you might get this error under /var/log/httpd/error_log (I was using a Fedora 13 machine). The trick is to install a package called "php-pdo" and then use the function.

su
yum install php-pdo

Hopefully it will save someone some heartache :)

1 comment:

  1. i guess it was not becuase you were using SQLLite, but because you used PDO functions in your php code.

    You must be knowing that PDO can be used to access other dbs like MySQL using common function so your code wont change if you move from SQLLite to MySQL.

    ReplyDelete