This extension allow use PHPPDO library for emulate PDO functionality.
Sometimes hosting providers disable PDO wholly or PDO_ particularly. This extension allow you to use PHP-emulated PDO class on that hostings.
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
For use it add in config/main.php:
...
'db'=>array(
'class'=>'application.extensions.PHPPDO.CPdoDbConnection',
'pdoClass' => 'PHPPDO',
...
),
...
Change Log ¶
Mar 7, 2010 ¶
- PHPPDO version bump, thanks to rohit.
Sep 15, 2009 ¶
- Fixed bug (PDO.php not found), thanks to Swarog.
June 15, 2009 ¶
- Fixed bug, thanks to Ryuuzaki.
June 9, 2009 ¶
- Fix for forced use of PHPPDO library: just add 'phpClass'=>'PHPPDO' db component parameter.
April 7, 2009 ¶
- Initial release.
helpful
some web hosting disabled PDO extension, and this extension emulates PDO very well. really helps me a lot. Thanks.
Thank You
Need it.
my host's pdo is not available!
Helped me a lot
On few hostings, pdo extension is not available! So, in that case this extension is very helpful.
The original classes have been upgraded from 1.2(which is used in this extension) to 1.4 by now. If the author of this extension does an upgrade it will be great. I just found, that only one class is for extension other files will just need update from original PHPPDO extension.
Good work. And very good example of extension!
太牛叉了。很实际的东西
very good!
Works great.
This extension is very good.
Unfortunately PDO_MYSQL is disabled here and this extesion emulates very good the the real PDO.
Why?
I do not understand the sense of this extension - yii is based on pdo, so what does your extension? Please write more about it.
but how to set in the config/main.php
i failed
'db'=>array(
'class'=>'application.extensions.PHPPDO.phppdo', 'pdoClass' => 'PHPPDO', 'connectionString' => 'mysql:host=localhost;dbname=yii', 'emulatePrepare' => true, 'username' => 'root', 'password' => '123456', 'charset' => 'utf8', 'tablePrefix'=> 'tbl_', ),
Great
Solved a big problem for me. Thanks.
Thx :D
I had problems with the pdo_oci driver and this extension solved the problem :)
Los Amo
Los adoro, Gracias Dios por esta gran comunidad, me han solucionado un gran problema laboral, Gracias. Esta libreria funciona perfecto, emula muy bien los driver PDO que no estan habilitados en Hosting Mediocres pero que toca usarlos por motivos laborales.
Gracias
Awesome Extension
Thanks For This Awesome Extension.
Bug in PHPPDO
It doesn't parse properly opertors like !=
I tried this statement:
UPDATE `item` SET `delivery_order_id`=NULL WHERE (id!=92) AND (delivery_order_id=32)
PHPPDO transforms it to
UPDATE `item` SET `delivery_order_id` = NULL WHERE (id! = 92 ) AND (delivery_order_id = 31)
I found the line where the code is incorrect, but i can't change the source !
Need someone to move the project to GitHub
The bug is in PHPPDO/divers/base_statement.php line 851
You have to change
return implode(' ', $prepared);
to
return implode('', $prepared);
and it works
RE: Bug in PHPPDO
cnlevy, thank you.
Bugs in project PHPPDO firstly must be sent to it author. Contact can be found at http://sourceforge.net/projects/phppdo.
If author of PHPPDO doesn't answer or I'm loose new version, I'm try to find time for export project to github - just wait for some 'Thumb up' on this post.
I'm just more often use <> instead of != (hm... in fact, I'm never utilize !=).
RE: RE: Bug in PHPPDO
I also never did... until I started using
http://www.yiiframework.com/extension/activerecord-relation-behavior
which autogenerated this query
Possible to use PHPPDO in multi-db setup??
I have a project where I need to connect to both MySQL and MSSQL databases, but unfortunately the client's host cannot install PDO_DBLIB and hence to PDO for the MSSQL database... Is it possible to use phppdo in this context?? My thought was no, since the docs for multiple databases want you to put
'class'=>'CDbConnection' and your docs say to put 'class'=>'application.extensions.PHPPDO.CPdoDbConnection' so I figured that would be a problem.
Any suggestions?
Works Great
awesome extension, thanks ... finally i solved my problem
thanks, for good extension !!
thank you, this is very good extension.
my app work fine in all php version without PDO :)
Saved my skin!
It looks like you saved my skin with this, for a large project being migrated to Oracle. Is this extension still being updated/fixed, BTW?
RE: Is this extension still being updated/fixed?
MetaYii, I alive. But upstream project doesn't have any updates since 1.4.
Thanks
thankyou so much!
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.