PDO problem when running app on shared hosting

Hi all,

I have a Mac and set up and run my Yii app on MAMP. Now I uploaded to a shared hosting environment. When trying to log on in the app I get this error:

include(PDO.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

I read a few forum posts on this topic but it was hard to understand because I’m a beginner. One thing I tried though, was checking whether PDO was enabled. So phpinfo(); on the shared hosting reveals in Configure Command: --enable-pdo=shared’ ‘–with-pdo-mysql=shared’ ‘–with-pdo-sqlite=shared’ . Nowhere else I could find the word PDO. However, on my MAMP there is a whole section on PDO with PDO Driver and pdo_mysql.

If you could explain in layman’s terms what the problem is and how I can solve it, I would highly appreciate it.

Thanks…

in php ini you have to enable PDO, and PDO driver for your database

If your phpinfo() shows as installed and with Igor suggestion doesnt work, then check on your PHP.INI file if the path to the PECL extensions is correct.

Thx guys, I deactivated my own php.ini (which didn’t have the correct path in it) and now it works just fine…