Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Page 1 of 2
PHP Extension “pdo_mysql” must be loaded
 
openo
Jr. Member
 
Total Posts:  4
Joined:  2007-11-28
 

Hi

I did search for a solution on the forum for this but couldn’t find one so was hoping someone could help.

Trying to install Magento but getting this error during installation…

PHP Extension “pdo_mysql” must be loaded

I have recompiled Apache and PHP several times now and PDO is installed and loaded, on SSH with php -m, “PDO” is on the list. I don’t get why Magento installation is not detecting the module?

Running CentOS with Apache 2 and PHP 5.2.5 (Also tested with PHP 5.2.3 with same result)

Hope someone can help.

Thanks

Ben.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Magento Team
 
Total Posts:  684
Joined:  2007-08-31
 

Hi openo,

Can your create a simple file under magento folder:

<?php phpinfo(); ?>
and check it there if the php used by your webserver does really has pdo_mysql ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
openo
Jr. Member
 
Total Posts:  4
Joined:  2007-11-28
 

Hi Michael

Thanks for the reply. I am not entirely sure what to look for.

http://www.openo.co.uk/phpinfo.php

I see “PDO” mentioned several times as enabled but unsure if its the one I’m looking for.

Anyway hope you can help.

Thanks

Ben.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Magento Team
 
Total Posts:  684
Joined:  2007-08-31
 

Though there is a section named PDO, it actually has no drivers compiled in:

PDO support    enabled
PDO drivers     no value
There should be at least
PDO support    enabled
PDO drivers     mysql
and a separate section named pdo_mysql containing smth like
PDO Driver for MySQLclient library version    4.1.22

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Magento Team
 
Total Posts:  684
Joined:  2007-08-31
 

You can try to add

–with-pdo-mysql=shared
or
–with-pdo-mysql=/usr
when compiling php.

Please let me know if it helps.

On the other hand you can try to run Magento under php5-cgi workaround that includes everything precompiled as described in the Installing Magento on a PHP4 server knowledge base article.
That might be a better option at the moment, due to the PHP 5.2.5 and Zend_Cache incompatibility - check this thread for a solution if you want to have Magento installed under your PHP 5.2.5 anyway.

 
Magento Community Magento Community
Magento Community
Magento Community
 
openo
Jr. Member
 
Total Posts:  4
Joined:  2007-11-28
 

Hi

I have recompiled with the custom flag as you suggested.

It now says in phpinfo…

PDO support enabled
PDO drivers sqlite, sqlite2

Still getting the same error during Magento Installation.

Ben.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Magento Team
 
Total Posts:  684
Joined:  2007-08-31
 

Sorry, but I still don’t see the --with-pdo-mysql option in your ./configure args ??

'./configure' '--enable-bcmath' '--enable-calendar' '--enable-discard-path'
'--enable-ftp' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring'
'--enable-pdo=shared' '--enable-sockets' '--prefix=/usr/local'
'--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/'
'--with-curlwrappers' '--with-gd' '--with-jpeg-dir=/usr'
'--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr'
'--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config'
'--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pdo-sqlite=shared'
'--with-png-dir=/usr' '--with-sqlite=shared' '--with-xpm-dir=/usr/X11R6'
'--with-zlib' '--with-zlib-dir=/usr'

 
Magento Community Magento Community
Magento Community
Magento Community
 
openo
Jr. Member
 
Total Posts:  4
Joined:  2007-11-28
 

Hi Michael

I tried again and it works now. Thanks for all your help grin

Ben.

 
Magento Community Magento Community
Magento Community
Magento Community
 
belmondo
Jr. Member
 
Total Posts:  3
Joined:  2007-12-09
 

same issue:

here is my phpinfo:

http://shop.333.ie/phpinfo.php

any suggestions?

thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

@belmondo: it shows you have:

PDO drivers sqlite, sqlite2

missing mysql there

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
belmondo
Jr. Member
 
Total Posts:  3
Joined:  2007-12-09
 

thanks M.

should i give the php5-cgi workaround a shot ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
belmondo
Jr. Member
 
Total Posts:  3
Joined:  2007-12-09
 

this is the driver you should request if you are on a hosting package:

http://ie2.php.net/manual/en/ref.pdo-mysql.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
randalrust
Jr. Member
 
Total Posts:  1
Joined:  2007-09-27
 

FWIW, I had the same issue on my development box (Win XP, Apache 2, PHP 5.2.5).

What doesn’t seem to be very clear is that this is a two-step process.

1. Uncomment extension=php_pdo.dll in your INI fle.
2. Uncomment extension=php_pdo_mysql.dll in your INI file.

HTH.

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyryde
Jr. Member
 
Total Posts:  10
Joined:  2008-01-13
 

Trying to install Magento (on Bluehost) but getting this error during installation…

PHP Extension “pdo_mysql” must be loaded

Here’s my phpinfo file:

http://www.stylerebel.com/phpinfo.php

Help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdsocali
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2008-01-31
 

I am getting the same error. Can someone help me? I talked to my host (ixwebhosting) and they told me everything was turned working on there end. I opened php.info in my cgi-bin and it said pdo_mysql was turned on.

Here is my phpinfo http://98.130.68.204/phpinfo.php.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

You have:
PDO
PDO support enabled
PDO drivers sqlite2, sqlite

there should be mysql and pdo_mysql section, like here: http://s232203681.onlinehome.us/

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
52294 users|446 users currently online|105616 forum posts