Is PDO supported by all PHP servers?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Is PDO supported by all PHP servers?

Post by kaisellgren »

Hello there,

I am working on a script, which requires people to have at least PHP 5.1.3. So PDO comes within the PHP release, but is it loaded on all PHP servers? Do you think it's wise to use PDO in PHP 5.1.3+ powered project? Should I provide an alternative choice for my own database abstraction layer which implements all major SQL languages?
Last edited by kaisellgren on Thu Aug 14, 2008 4:46 am, edited 1 time in total.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Is PDO supported by all PHP servers?

Post by onion2k »

I would never rely on anything that the admin can remove being there. You don't need to go all the way to providing your own abstraction though - just have the code test to see if PDO is available and dump the user to an error page that tells them to enable it if it isn't.
Post Reply