[Solved] Fatal error: Class 'PDO' not found

Discussion in 'General' started by supernoob, Jun 8, 2011.

  1. supernoob

    supernoob Member

    I wonder if anyone can help me, I'm running a cPanel server with LiteSpeed - EasyApache integration is enabled, and I've also generated a matching PHP binary using the LiteSpeed panel.

    But on my site that runs Piwik for stats I get this error

    Fatal error: Class 'PDO' not found in /home/stats/public_html/stats/core/Db/Adapter/Pdo/Mysql.php on line 22
    Could anyone please advise or tell me how to fix this, I've tried rebuilding many times but every time I check PHP Info page PDO is not running. I'm lost for ideas and if anyone could share some or how to solve this I would be grateful.
  2. webizen

    webizen Well-Known Member

    make sure you check PDO in Exhaustive Options List when do EasyApache (Apache Update).
  3. supernoob

    supernoob Member


    This is ticked and it appears in the configure command, but PDO is not enabled/does not work/doesnt have its own section in the phpinfo() hence its not loading or something?
    Last edited: Jun 8, 2011
  4. webizen

    webizen Well-Known Member

    since pdo is built as shared module (with option '--enable-pdo=shared'), you need to make sure line 'extension=pdo.so' is placed in php.ini. to find out which php.ini is in use, do following from command line
    or look for "Loaded Configuration File" in phpinfo page.
  5. supernoob

    supernoob Member

    root@server[~]# /usr/local/lsws/fcgi-bin/lsphp5 -i | grep "Loaded Configuration File"
    Loaded Configuration File => /usr/local/lib/php.ini

    Heres the output of php.ini

  6. supernoob

    supernoob Member

    Thanks all fixed!

Share This Page