By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,649 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,649 IT Pros & Developers. It's quick & easy.

driver not found error when trying to use PDO, PHP (5.2) and mysql

P: n/a
Hello Newsgroup,

I have "installed" pdo using "pecl install pdo" (it intalled version
1.0.3),
I have added the line "extension=pdo.so" to my php.ini file, but when I
try to use
the PDO db connect string "$db = new
PDO('msql:server=dbserver;dbname=menagerie',$dbuse r,$dbpass); "
i get a "driver not found" error.

the pdo.so file is located in
:/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so

Any ideas on how to fix this???

eholz1

Nov 24 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You need to install pdo_mysql

$ pecl install pdo_mysql

And of course add the .so file to your php.ini, just as you did with pdo.so

That should do the trick.

:o)
Thomas
eholz1 wrote:
Hello Newsgroup,

I have "installed" pdo using "pecl install pdo" (it intalled version
1.0.3),
I have added the line "extension=pdo.so" to my php.ini file, but when I
try to use
the PDO db connect string "$db = new
PDO('msql:server=dbserver;dbname=menagerie',$dbuse r,$dbpass); "
i get a "driver not found" error.

the pdo.so file is located in
:/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so

Any ideas on how to fix this???

eholz1
Nov 24 '06 #2

P: n/a
Hello,

Who would have thought! I saw but did not see. I will load that in,
and see what happens.

Thanks,

eholz1

Thomas wrote:
You need to install pdo_mysql

$ pecl install pdo_mysql

And of course add the .so file to your php.ini, just as you did with pdo.so

That should do the trick.

:o)
Thomas
eholz1 wrote:
Hello Newsgroup,

I have "installed" pdo using "pecl install pdo" (it intalled version
1.0.3),
I have added the line "extension=pdo.so" to my php.ini file, but when I
try to use
the PDO db connect string "$db = new
PDO('msql:server=dbserver;dbname=menagerie',$dbuse r,$dbpass); "
i get a "driver not found" error.

the pdo.so file is located in
:/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so

Any ideas on how to fix this???

eholz1
Nov 25 '06 #3

P: n/a

Thomas wrote:
You need to install pdo_mysql

$ pecl install pdo_mysql

And of course add the .so file to your php.ini, just as you did with pdo.so

That should do the trick.

:o)
Thomas
eholz1 wrote:
Hello Newsgroup,

I have "installed" pdo using "pecl install pdo" (it intalled version
1.0.3),
I have added the line "extension=pdo.so" to my php.ini file, but when I
try to use
the PDO db connect string "$db = new
PDO('msql:server=dbserver;dbname=menagerie',$dbuse r,$dbpass); "
i get a "driver not found" error.

the pdo.so file is located in
:/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so

Any ideas on how to fix this???

eholz1
Hello again,

I did get the pdo_mysql file as you suggested. and even uncommented
the extesion_dir in php.ini.
One problem - I entered the directory -
/usr/local/lib/php/extensions//no-debug-non-zts-20060613/ where both
files reside (pdo.so, and pd0_mysql.so), but after I make that change
to the php.ini file, apache will not start. I then copied the files to
other places, but no luck apache would start but I still get the
"driver not found" error.
Perhaps I need to rebuild php???

Thanks,

ehol1

Nov 25 '06 #4

P: n/a
You shouldn't have to rebuild PHP. What errors are Apache throwing when
trying to start?

What value do you have in extension_dir in php.ini?

Are you trying to load pd0_mysql.so, when you really should load
pdo_mysql.so?

Regards,
Thomas
eholz1 wrote:
>
Hello again,

I did get the pdo_mysql file as you suggested. and even uncommented
the extesion_dir in php.ini.
One problem - I entered the directory -
/usr/local/lib/php/extensions//no-debug-non-zts-20060613/ where both
files reside (pdo.so, and pd0_mysql.so), but after I make that change
to the php.ini file, apache will not start. I then copied the files to
other places, but no luck apache would start but I still get the
"driver not found" error.
Perhaps I need to rebuild php???

Thanks,

ehol1
Nov 25 '06 #5

P: n/a

Thomas wrote:
You shouldn't have to rebuild PHP. What errors are Apache throwing when
trying to start?

What value do you have in extension_dir in php.ini?

Are you trying to load pd0_mysql.so, when you really should load
pdo_mysql.so?

Regards,
Thomas
eholz1 wrote:

Hello again,

I did get the pdo_mysql file as you suggested. and even uncommented
the extesion_dir in php.ini.
One problem - I entered the directory -
/usr/local/lib/php/extensions//no-debug-non-zts-20060613/ where both
files reside (pdo.so, and pd0_mysql.so), but after I make that change
to the php.ini file, apache will not start. I then copied the files to
other places, but no luck apache would start but I still get the
"driver not found" error.
Perhaps I need to rebuild php???

Thanks,

ehol1
Hello Thomas,
Thanks for info. I have discovered something, but it is strange! If
specify "extension_dir = /usr/local/apache2/extentions" AND put the
pdo.so and/or pdo_mysql.so (not pd0 a typo in posting) in that
directory (or if I put those files in ANY dir defined in the
"extensions_dir") apache will not start, and will not give any erors
(in access_log or error_log). So it seems that Apache (2.2) does not
like those files for some reason - maybe they did not intall properly
or are corrupted. As long as I do not put the files in the referenced
directory Apache will start (but PDO will not work either!)
Let me know what you think.
Eric

Nov 27 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.