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

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

  1. supernoob

    supernoob New 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

    Code:
    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 New Member

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

    supernoob New Member

    Hi,

    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 New 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 New 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

    http://pastebin.com/XJY0yv0E
  6. supernoob

    supernoob New Member

    Thanks all fixed!

Share This Page