Don't Make The Same Mistake With PDO

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
PHPHelpNeeded
Forum Commoner
Posts: 83
Joined: Mon Nov 17, 2014 8:03 pm

Don't Make The Same Mistake With PDO

Post by PHPHelpNeeded »

Dear Fellow PHPers, and Forum goers,

Note: I use IIS 7 in Windows 8.1; Perhaps it is different for you using unix or mac os, goodluck!

I have to apologize for all the trouble I have cause posting forum questions like the following:

viewtopic.php?f=1&t=140644

It is obvious my first time dealing with php or with web server, or MySQL or PDO for that matter.

But where there is room to learn and analyze what's the problem and coming up with a solution at least amount to a well learned lesson.

Now the php.net instructions in enabling and installing PDO database driver all misleading to certain extent.

For instance, in the part where this link http://php.net/manual/en/pdo.installation.php is suggesting that you should enable the php_pdo.dll extension. DON'T DO IT. PHP 5.6.3 already comes with it, I not too sure or have proof of this, but I think it is already built in to the php.exe, which means it is already enabled. So when you enable it you will get an error telling you the PDO_MYSQL module is already enabled.

You will not need to enable no other extension for PDO to work, I got some weird error messages going around to all places.

if you read my previous post you will know.

Anyhow, that's a lesson well learned.

I hope someone with IIS windows can find this useful before going to enable extensions that already NOT needed to be RE-enabled.

Thanks.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Don't Make The Same Mistake With PDO

Post by requinix »

PDO is not built-in. I don't know what you did but it seems you tried to enable it twice.
PHPHelpNeeded
Forum Commoner
Posts: 83
Joined: Mon Nov 17, 2014 8:03 pm

Re: Don't Make The Same Mistake With PDO

Post by PHPHelpNeeded »

I know, but look at this, these are my extensions in my php.ini file:

[syntax]
[ExtensionList]
extension=php_sockets.dll

extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_curl.dll
extension=php_exif.dll
extension=php_xmlrpc.dll
extension=php_openssl.dll
extension=php_soap.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll

[/syntax]

Now ask yourself, is there a PHP_PDO.DLL there in these lines...

My mistake was that the instructions say, for UNIX to enter the extension=php_pdo.dll line but it also say to enable these the desire extensions out all the pdo extensions that are available.

My first mistake when I did that was to enable them all, that's why I got the error that the fbclient.dll and oci.dll files were missing, because php.exe were looking for the program that has those extensions.

My second mistake was to then comment out the troubling extensions and only leaving the php_pdo_mysql.dll enable, that I was enabling it twice and I didn't know until a while ago.

You are right, it is not built in, I just cannot tell the difference between the php_pdo.dll (which is needed for unix) and php_pdo_mysql.dll (needed for windows), these two files could be doing exactly the same thing.

I mean it was my honest mistake.

I still the instructions from php.net are vague.
Post Reply