Error in shared hosting - include(PDO.php)


It is really nice to see such a wonderfull framework for PHP and as I’m from ASP.NET background it was really easy to understand Yii and work as I have worked with MVC2 and ADO EF. Thanks again for such nice framework

But we all need finally to deploy our web site at shared hosting, my sample app is working fine locally under XAMP with database access and all. But when I deploy it to remote server together with Yii framework and after doing steps given , I can access my landing page. But when I try to access a page which interact with database I’m getting following error. Can someone explain what should I do in order to fix this, I have hosted this application at remote server if anyone would like to access it and see.

This works:

This failes:

Thank you


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

Source File


00383: * @return boolean whether the class has been loaded successfully

00384: */

00385: public static function autoload($className)

00386: {

00387: // use include so that the error PHP file may appear

00388: if(isset(self::$_coreClasses[$className]))

00389: include(YII_PATH.self::$_coreClasses[$className]);

00390: else if(isset(self::$classMap[$className]))

00391: include(self::$classMap[$className]);

00392: else

00393: {

00394: if(strpos($className,’\\’)===false)

00395: include($className.’.php’);

00396: else // class name with namespace in PHP 5.3

00397: {

00398: $namespace=str_replace(’\\’,’.’,ltrim($className,’\\’));

00399: if(($path=self::getPathOfAlias($namespace))!==false)

00400: include($path.’.php’);

00401: else

00402: return false;

00403: }

00404: return class_exists($className,false) || interface_exists($className,false);

00405: }

00406: return true;

00407: }

Looks like you don’t have the PDO enabled on the server…

You need to check the Yii requirements -


thank you very much, with my windows hosting in godaddy I had this issue, and as you mentioned PDO was not enabled and I don’t know how to enable it from there control panel, but then i tried with Linux hosting which has PDO enabled and it works fine. So I will find how to enable it

Thank you very much and again thanks for producing such a nice framework, it is really easy to use, specially when coming from the ASP.NET MVC2 background even with little PHP knowledge

do u mean the linux hosting on has the PDO for mysql extension enabled?