include(PDO.php) Error

I receive an


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

error on my shared host. Everything runs fine on the local machine and used to work on the shared host. I made no changes or uploaded any new files.

My shared hosting custom php.ini has pdo enabled for mysql


max_execution_time = 400

extension=mcrypt.so

short_open_tag = on

extension=pdo.so

extension=pdo_mysql.so

The yii requirements checker shows only three warnings


PDO PostgreSQL extension Warning All DB-related classes This is required if you are using PostgreSQL database.

Memcache extension Warning CMemCache 	 

APC extension Warning CApcCache

The only difference I can see regarding PECL between my local machine and the shared host (using phpinfo()) is on my local machine I see a PECL module under SQLite and a PECL version under pdf.

I do not use SQLite and I have another site running on the shared host using the same framework with mysql without a problem.

What am I missing?

Thanks in advance.

But when you check php configuration on your host(uning phpinfo command) do you see PDO and PDO MySql extensions installed?

Yes.


Configure Command '--enable-pdo=shared' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared'

Ok, compailer is configured with pdo, but that doesn’t mean that everything is installed correctly. Can you share output from phpinfo command related to PDO and PDO-MySql extensions?

That is all the information I find for PDO. You can view phpinfo() here http://hudsonreels.com/phpinfo.php.

The confusing thing is that I have another yii application using MySQL running fine on the same server.

The problem is an incorrect path. When I duplicate my application in a sub directory, http://hudsonreels.com/hudson/index.php/order, on my web host, everything is fine (which is how my local machine is set up). In the root directory of the web host, http://hudsonreels.com/index.php/order, I receive the


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

error.

My index.php has two lines one for local and one for live


//$yii=dirname(__FILE__).'/../framework/yii.php'; //Local Development

$yii=dirname(__FILE__).'/framework/yii.php'; //Live Site

What other path(s) need changing to fix this?

Solved.

The problem was caused by a php.ini file my host allows for customization. Once I removed this file all is good. I don’t know why this only caused an error on my application in the public_html directory.

I have faced this problem also that when we have a local php.ini file, yii gives the same error of failed to include file.

I have checked that even when the other php.ini file is blank, yii throws the error.

What is it and how to overcome this problem?