Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 4
PHP Extension “pdo_mysql” must be loaded. 
 
Jesse-Lee Stringer
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2007-09-03
Melbourne, Australia
 

Hi All,

After a long day of uploading magento I’m confronted with the following error, there’s no way to proceed otherwise however I would appreciate knowing if there is something that I can modify in order to install.

UnixBox running Apache and Php 5

PHP Extension "pdo_mysql" must be loaded.
            
Please set required permissions before clicking Continue

The server that it is running on contains the following information (maybe of use?)

PDO
PDO support    enabled
PDO drivers     sqlite2
sqlite

pdo_sqlite
PDO Driver 
for SQLite 3.x    enabled
PECL Module version     
(bundled1.0.1 $Idpdo_sqlite.c,v 1.10.2.6.2.1 2007/01/01 09:36:05 sebastian Exp $
SQLite Library     3.3.7

Zend Information

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0Copyright (c1998-2007 Zend Technologies
    with Zend Extension Manager v1.2.0
Copyright (c2003-2007by Zend Technologies
    with Zend Optimizer v3.2.8
Copyright (c1998-2007by Zend Technologies

Jesse-Lee Stringer

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tweakmag
Guru
 
Avatar
Total Posts:  307
Joined:  2007-08-31
London, UK
 

All you need to do is edit your php.ini file to enable pdo_mysql extension smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jesse-Lee Stringer
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2007-09-03
Melbourne, Australia
 

Thanks, Will try :D

 
Magento Community Magento Community
Magento Community
Magento Community
 
rvelton
Sr. Member
 
Total Posts:  82
Joined:  2007-09-07
 

Okay I have been trying to get this stuff installed but have been running into problems.  I have been using this URL as reference for installing PDO and PDO_MYSQL:

http://www.qwesz.com/php-manual/ref.pdo.html

Is that the right thing to do for both of those extensions?  I can do that for PDO no problem but when I try that with PDO_MYSQL and then try to restart apache here is the error that I get:

/etc/init.d/httpd: line 83: 18100 Segmentation fault $HTTPD -DSSL
/etc/init.d/httpd start: httpd could not be started

I also added these 2 lines to the PHP.ini File:

extension=pdo.so
extension=pdo_mysql.so

Any ideas would be awesome.

 
Magento Community Magento Community
Magento Community
Magento Community
 
_
Sr. Member
 
Total Posts:  152
Joined:  2007-08-31
 

Are you using shared hosting or local server (ex. WAMP/XAMMP) ? If local server than you must restart the Apache but not only by ending it but also by killing process (ex. Task Manager in Windows) .

Please check also with phpinfo if those modules are in use.

 
Magento Community Magento Community
Magento Community
Magento Community
 
5live
Jr. Member
 
Total Posts:  28
Joined:  2007-09-01
 
rvelton - 08 September 2007 09:32 AM

Okay I have been trying to get this stuff installed but have been running into problems.  I have been using this URL as reference for installing PDO and PDO_MYSQL:

http://www.qwesz.com/php-manual/ref.pdo.html

Is that the right thing to do for both of those extensions?  I can do that for PDO no problem but when I try that with PDO_MYSQL and then try to restart apache here is the error that I get:

/etc/init.d/httpd: line 83: 18100 Segmentation fault $HTTPD -DSSL
/etc/init.d/httpd start: httpd could not be started

I also added these 2 lines to the PHP.ini File:


extension=pdo.so
extension=pdo_mysql.so

Any ideas would be awesome.

I am also getting a segmentation fault error when restarting apache...but its a little different:

httpd[23077]segfault at 00000020abef8f07 rip 00000020abef8f07 rsp 00000000006e6ad0 error 14

is your server 32bit or 64bit architecure? because i think this may be a problem with 64bit servers.

has anybody gotten POD_MYSQL to work on 64bit server?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rvelton
Sr. Member
 
Total Posts:  82
Joined:  2007-09-07
 
A.Piotrowski (Lento.pl) - 08 September 2007 09:45 AM

Are you using shared hosting or local server (ex. WAMP/XAMMP) ? If local server than you must restart the Apache but not only by ending it but also by killing process (ex. Task Manager in Windows) .

Please check also with phpinfo if those modules are in use.

I have a dedicated box.

WHM 11.2.0 cPanel 11.10.0-S16448
FEDORA 4 i686 - WHM X v3.1.0

I have killed the process and started it manually, done the apache restart and the httpd stop and start.

Still not sure what the problem is.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tweakmag
Guru
 
Avatar
Total Posts:  307
Joined:  2007-08-31
London, UK
 

Are both…

pdo.so
pdo_mysql.so

in your extensions folder??

 
Magento Community Magento Community
Magento Community
Magento Community
 
rvelton
Sr. Member
 
Total Posts:  82
Joined:  2007-09-07
 

Yes. But when I restarted apache it came up with that fault code error.  Then I deleted the PDO_MYSQL.so and apache restarted fine.  I am wondering if there is a compile problem with the latest version of PDO_MYSQL.so from the PHP.net website?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jesse-Lee Stringer
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2007-09-03
Melbourne, Australia
 

I’m currently running a shared box,
from knowledge I don’t expect that the modules are installed, yet alone able to be pulled from the php.ini file

here’s the code that I’ve added to the php.ini file

extension=pdo.so
extension
=pdo_mysql.so
extension
=pdo_pgsql.so

I should ask, pdo_sqlite refers to a lite version of pdo_mysql?

Bear in mind I’ve done nothing else then added the php.ini code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

I ran into this issue as well…
I’m on a dedicated machine so I was able to handle this myself but the Solution was that I had to re-make PHP with the PDO_mysql extension. Just enabling the extension in PHP.ini doesn’t matter if it’s not installed in the first place. I was banging my head against a wall because I didn’t read carefully that my PHP info stated that Pdo WAS installed… but only for SQLite.  This is because with PHP 5+ PDO comes activated DEFAULT but only with drivers for SQLite.  SO ... what I had to do was install the PDO_mysql driver into PHP and it worked fine.

The command I used via EasyApache (For Cpanel Users) is:

“--with-pdo-mysql”

So if you have Cpanel and SSH access or if you can get your host to re-install PHP (takes about 15 mins) here’s what you would do. (This is for CPANEL users):

CUSTOM_PHP_FLAGS="--with-pdo-mysql" /scripts/easyapache

That will rebuild PHP along with the drivers for PDO_mysql.  Take note that it will rebuild the entire PHP installation so when it asks you for a New install choose the #7 option which is to use PREVIOUS values (that way all you are doing is UPDATING the installation with PDO_mysql rather than building from scratch.

Hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CrashTest
Member
 
Avatar
Total Posts:  43
Joined:  2007-09-12
Boise, ID
 

I have gotten BlueHost to enable the pdo_mysql extension, and they provided me with a php.ini file, instructed me to add the extension=pdo_mysql.so to it, which I did, then said: “copy this file to all directories, including subdirectories, that have PHP files in them” Now, that seems like it shouldn’t be necessary, also because there are like 24000 files, and lots of directories, I don’t think it is even really do-able.

So, where do I place the php.ini file so that Magento sees it?  I have it in the root with the index.php, and in the app/ directory as well.  Where else should it be to be effective? 

I have checked, in these two places it is still not making a difference.  Still get the PHP Extension “pdo_mysql” must be loaded error message.

Thanks,

Pat

 
Magento Community Magento Community
Magento Community
Magento Community
 
edoluz
Jr. Member
 
Total Posts:  2
Joined:  2008-07-20
 

Hi all. I’m from Italy.
I’m new and i’m trying to install Magento in remote.
I’ve received the same error on my server and i’d like to ask you how to make Magento working with my hosting plan…

Thanks a lot.

Edoardo Resta

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 

@ edoluz: Have you tried renaming the php.ini file to php5.ini? That solved our problem. wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
IainK
Jr. Member
 
Total Posts:  7
Joined:  2008-09-01
 

Anyone with a dedicated server running FreeBSD having installed PHP5 with ports will notice there is no way to add pdo_mysql by editting the php.ini file or in the list of options for ‘php5-extensions’ port.
You can easily correct this though by issuing the following commands in SSH as root;

cd /usr/ports/databases/php5-pdo_mysql/
make install clean

Now Magento will install smile

And if you get a ‘PDOException’ or ‘errno 12’ just drop the database, recreate it then reload the page it will fill in the tables.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MonkFunk
Jr. Member
 
Total Posts:  20
Joined:  2008-11-26
 

I am getting the same thing: PHP Extension “pdo_mysql” must be loaded I cannot get past it, any ideas? tried uploading as php5.ini but no luck as well

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 4