View Full Version : Yii Framework and PDO extension
ortodemo
06-13-2009, 10:47 PM
Does someone installed YII framework on hostmonster?
I am trying to do it, the requeriments are all ok.
yiic webapp ../myapp was OK
but when I try to built my first application with mysql, modifying my protected/config/main.php to:
'db'=>array(
'connectionString'=>'mysql:host=localhost;dbname=mydb','username'=>'myuser, 'password'=>'mypwd', 'charset'=>'utf8'
),
Then
../framework/yiic shell $HOME/public_html/myapp/index.php
But then, I get this
include(PDO.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory
alvinpp2
07-10-2009, 07:18 AM
Were you able to solve this problem?
I'm experiencing the same thing. Weird thing is my Yii app used to work before. It was only this morning when I got the exact same error. I tried re-uploading all the files (even deleted the ones in the server before I did) and it didn't help.
shadmego
07-10-2009, 07:26 AM
Much of the time when I experience weird problems that crop up with no warning and that make no sense, it is fixed by reinstalling the php.ini file for my account. I don't know if this will work for this issue, but it might be worth a shot ... (backup your original php.ini first!!)
I remember trying to install Yii to play around with it a bit but couldn't figure out how to get it to work properly, so I quite playing with it.
~regards
alvinpp2
07-10-2009, 08:14 AM
Thanks for the reply. I ran the Yii requirements checker and it says that both the PDO and PDO MySQL extensions are not enabled. Strange because I could have sworn that they were available in hostmonster before. Does this mean that I would no longer be able to run Yii apps that accesses a MySQL database?
alvinpp2
07-10-2009, 09:08 AM
I already submitted a support ticket for this and waiting for reply.
shadmego
07-10-2009, 12:39 PM
loading the PDO extensions is something that *I believe* happens when installing a new php.ini file. Here is what is at the end of my php.ini file:
zend_extension=/home/{account}/ioncube/ioncube_loader_lin.so
zend_extension_ts=/home/{account}/ioncube/ioncube_loader_lin_ts.so
extension=ixedts.lin
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
extension=pdo.so
extension=sqlite.so
extension=pdo_sqlite.so
extension=pdo_mysql.so
Where {account} is my HM account username/home directory. Modify it to match your environment and see if that works for you ....
~regards
mmonsen
07-10-2009, 10:19 PM
Also, to help make sure you have the correct things turned on inside your php.ini you can add a php file called phpinfo.php or info.php or something along those lines and then add the following code to that file:
<?php phpinfo(); ?>
When you view this page from your browser it will tell you about the configuration of php for that directory. You then would want to look to make sure pdo was enabled and if it isn't then you just need to adjust your php.ini file to something similar that was posted by shadmego.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.