The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Fatal error: Class 'PDO' not found in

Discussion in 'General Discussion' started by tiff2342, Aug 5, 2012.

  1. tiff2342

    tiff2342 Well-Known Member

    Joined:
    Apr 20, 2012
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    PHP Fatal error: Class 'PDO' not found in /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database/Mysql.php on line 177
    PHP INFO:

    PDO

    PDO support => enabled
    PDO drivers => sqlite, sqlite2, mysql

    pdo_mysql

    PDO Driver for MySQL => enabled
    Client API version => 5.5.24

    Directive => Local Value => Master Value
    pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock

    pdo_sqlite

    PDO Driver for SQLite 3.x => enabled
    SQLite Library => 3.7.7.1
    PHP INI:

    extension=pdo.so
    extension=pdo_sqlite.so
    extension=sqlite.so
    extension=pdo_mysql.so


    Ideas as to why I'm getting this error?

    PHP 5.3.15 CloudLinux/CentOS 6 CPanel
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are you putting up a phpinfo page in the /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database directory itself? If you have a php.ini file set up somewhere before that folder without the proper extensions set, it will use that php.ini instead of the global one under suPHP. As such, what configuration file is it showing being used if you put a phpinfo into /home/bd/public_html/app/webroot/Cake/Model/Datasource/Database folder?
     
  3. tiff2342

    tiff2342 Well-Known Member

    Joined:
    Apr 20, 2012
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Nope. no php.ini any where to be found and its all using the same php settings.
     
  4. zeta1600

    zeta1600 Member

    Joined:
    Mar 25, 2011
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    We recently upgraded to a newer release of MySql. And we recieved the error: "Fatal error: Class 'PDO' not found in ..."

    WHM 11.34.1
    Apache 2.2.23
    PHP 5.3.21

    We went to EasyApache to rebuild the profile. In the Exhaustive Options List, and PDO and PDO MySQL was not ticked, so we selected both. Went through the rebuild.

    Then, we found out that in Home » Service Configuration » PHP Configuration Editor » Advanced
    Core | extension, the text was written this way:
    timezonedb.so, pdf.soextension=pdo.so, pdo_sqlite.so, sqlite.so, pdo_mysql.so, pdo.so

    I edited it to add a comma and space after pdf.so, like so:
    timezonedb.so, pdf.so, extension=pdo.so, pdo_sqlite.so, sqlite.so, pdo_mysql.so, pdo.so

    I hope that this helps someone...
     
  5. dualmonitor

    dualmonitor Active Member

    Joined:
    Dec 3, 2012
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    WHM 11.36.0 (build 14)
    Apache 2.2.24
    PHP Version 5.4.12

    From my php.info

    And my php.ini includes:

    I was really hoping that your advice:

    ...was going to help but unfortunately I'm still getting the message:

    Fatal error: Class 'PDO' not found in /home/...

    I've looked around and taken all the steps I thought I needed but unfortunately I'm still getting that error. :(

    Anyone have any suggestions?
     
  6. dualmonitor

    dualmonitor Active Member

    Joined:
    Dec 3, 2012
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page