Yii Framework Forum: include(PDO.php) Error - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

include(PDO.php) Error Rate Topic: -----

#1 User is offline   joev 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 21-December 11
  • Location:NYC

Posted 11 April 2012 - 11:04 AM

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.
0

#2 User is offline   Ivica 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 317
  • Joined: 25-May 11

Posted 11 April 2012 - 11:19 PM

But when you check php configuration on your host(uning phpinfo command) do you see PDO and PDO MySql extensions installed?
Zurmo: Yii Powered Open Source CRM
zurmo.org
0

#3 User is offline   joev 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 21-December 11
  • Location:NYC

Posted 12 April 2012 - 07:25 AM

View PostIvica, on 11 April 2012 - 11:19 PM, said:

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'

0

#4 User is offline   Ivica 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 317
  • Joined: 25-May 11

Posted 12 April 2012 - 07:42 AM

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?
Zurmo: Yii Powered Open Source CRM
zurmo.org
0

#5 User is offline   joev 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 21-December 11
  • Location:NYC

Posted 12 April 2012 - 08:12 AM

View PostIvica, on 12 April 2012 - 07:42 AM, said:

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.
0

#6 User is offline   joev 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 21-December 11
  • Location:NYC

Posted 12 April 2012 - 04:04 PM

The problem is an incorrect path. When I duplicate my application in a sub directory, http://hudsonreels.c...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?
0

#7 User is offline   joev 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 21-December 11
  • Location:NYC

Posted 12 April 2012 - 06:35 PM

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.
0

#8 User is offline   Rehan Anis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 20-October 10
  • Location:Karachi, Pakistan

Posted 03 April 2014 - 08:50 AM

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?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users