How to fix php “Uncaught exception ‘PDOException’ with message ‘could not find driver'” on FreeBSD

Wednesday, 16th March 2011

After some upgrades of PHP, My Less’n More URL suddenly stopped working with an error:

Uncaught exception 'PDOException' with message 'could not find driver'

After a bit of investigation I’ve figured out the error is caused by a missing php5-pdo and php5-pdo_mysql

Of course if you’re using php52 you will need to install respectively the ports php52-pdo and php5-pdo_mysql :

To resolve the issues issue the commands:

freebsd# cd /usr/ports/databases/php5-pdo
freebsd# make install clean
freebsd# cd /usr/ports/databases/php5-pdo_mysql
freebsd# make install clean

Share this on:

Download PDFDownload PDF

Tags:

3 Responses to “How to fix php “Uncaught exception ‘PDOException’ with message ‘could not find driver'” on FreeBSD”

  1. anonymous says:
    Chromium 12.0.742.91 Chromium 12.0.742.91 Ubuntu 10.10 x64 Ubuntu 10.10 x64
    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/10.10 Chromium/12.0.742.91 Chrome/12.0.742.91 Safari/534.30

    Thanks for this, it helped me out greatly

    View CommentView Comment
  2. Frieda says:
    Google Chrome 13.0.782.112 Google Chrome 13.0.782.112 Windows Vista Windows Vista
    Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1

    Great info. Lucky me I discovered your site by accident (stumbleupon).

    I’ve saved it for later!

    View CommentView Comment
  3. Ila says:
    Opera 9.64 Opera 9.64 Windows XP Windows XP
    Opera/9.64(Windows NT 5.1; U; en) Presto/2.1.1

    Good post here, thanks for sharing the info.

    View CommentView Comment

Leave a Reply

CommentLuv badge