Yii Framework Forum: PDO problem when running app on shared hosting - Yii Framework Forum

Jump to content

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

PDO problem when running app on shared hosting include(PDO.php) [<a href='function.include'>function. Rate Topic: -----

#1 User is offline   mike81 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 27-February 11

Posted 08 May 2011 - 04:37 PM

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

#2 User is offline   Igor Ivanovic 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 17-October 10
  • Location:Zagreb

Posted 08 May 2011 - 05:48 PM

View Postmike81, on 08 May 2011 - 04:37 PM, said:

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
0

#3 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 08 May 2011 - 06:20 PM

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.
┬┐How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#4 User is offline   mike81 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 27-February 11

Posted 08 May 2011 - 06:58 PM

View PostAntonio Ramirez, on 08 May 2011 - 06:20 PM, said:

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