Magento Forum

   
Installation Problems—PDO and mysqli
 
beley
Jr. Member
 
Total Posts:  15
Joined:  2007-08-31
LaGrange, GA
 

My first problem was with the PDO/MySQL—I could not get it to recognize or install. Then I happened upon a post by someone who said to comment out those lines in the install config file and xml doc and just use mysqli… which I tried.

It let me into the installer, but upon entering all my mysql connection information I was presented with the following error:

<code>
exception ‘Zend_Db_Statement_Mysqli_Exception’ with message ‘Mysqli prepare error: This command is not supported in the prepared statement protocol yet’ in /home/absolute/public_html/lib/Zend/Db/Statement/Mysqli.php:85
Stack trace:
#0 /home/absolute/public_html/lib/Zend/Db/Statement.php(109): Zend_Db_Statement_Mysqli->_prepare(’checksum table ...’)
#1 /home/absolute/public_html/lib/Zend/Db/Adapter/Mysqli.php(330): Zend_Db_Statement->__construct(Object(Varien_Db_Adapter_Mysqli), ‘checksum table ...’)
#2 /home/absolute/public_html/lib/Zend/Db/Adapter/Abstract.php(382): Zend_Db_Adapter_Mysqli->prepare(’checksum table ...’)
#3 /home/absolute/public_html/lib/Zend/Db/Adapter/Abstract.php(590): Zend_Db_Adapter_Abstract->query(’checksum table ...’, Array)
#4 /home/absolute/public_html/app/code/core/Mage/Core/Model/Mysql4/Config.php(51): Zend_Db_Adapter_Abstract->fetchAll(’checksum table ...’)
#5 /home/absolute/public_html/app/code/core/Mage/Core/Model/Config.php(122): Mage_Core_Model_Mysql4_Config->getChecksum(’config_data,web...’)
#6 /home/absolute/public_html/app/Mage.php(326): Mage_Core_Model_Config->init(NULL)
#7 /home/absolute/public_html/app/Mage.php(349): Mage::init(NULL)
#8 /home/absolute/public_html/index.php(27): Mage::run(’base’)
#9 {main}
</code>

Does anyone know how to fix this? I would happily install PDO if I knew where/how? I tried ‘pecl install PDO PDO_MYSQL’ but got errors.

Any suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
beley
Jr. Member
 
Total Posts:  15
Joined:  2007-08-31
LaGrange, GA
 

Anyone have any ideas about this?

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

which version of magento do you have installed?
which distribution of linux you have?

 
Magento Community Magento Community
Magento Community
Magento Community
 
beley
Jr. Member
 
Total Posts:  15
Joined:  2007-08-31
LaGrange, GA
 

I have tried removing all the files and download the latest version (0.6.13160) and have changed the configuration files to use mysqli only (I do not have pdo_mysql and it’s not easily configured because I’m on a cPanel server and would have to go around cpanel to compile Apache manually)

Below is the output I get:

http://www.absolutetactical.com/output.txt

My server is running RHEL (or the white box version of it, CentOS I think), PHP Version 5.2.4

Below is my configure:
‘./configure’ ‘--with-apxs=/usr/local/apache/bin/apxs’ ‘--prefix=/usr/local’ ‘--with-xml’ ‘--enable-bcmath’ ‘--enable-calendar’ ‘--with-curl’ ‘--enable-ftp’ ‘--with-gd’ ‘--with-jpeg-dir=/usr/local’ ‘--with-png-dir=/usr’ ‘--with-xpm-dir=/usr/X11R6’ ‘--with-gettext’ ‘--enable-mbstring’ ‘--enable-mbstr-enc-trans’ ‘--enable-mbregex’ ‘--with-mcrypt’ ‘--enable-magic-quotes’ ‘--with-mysqli’ ‘--with-mysql=/usr’ ‘--with-openssl’ ‘--enable-discard-path’ ‘--with-pear’ ‘--enable-sockets’ ‘--enable-track-vars’ ‘--with-ttf’ ‘--with-freetype-dir=/usr’ ‘--enable-gd-native-ttf’ ‘--with-zlib’

MySQL Version 4.1.22-standard

I have all of the requirements sans pdo_mysql for which I did the workaround. What’s wrong?

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

Did you try solution from here:
http://www.magentocommerce.com/boards/viewthread/1126/#t5568

 
Magento Community Magento Community
Magento Community
Magento Community
 
beley
Jr. Member
 
Total Posts:  15
Joined:  2007-08-31
LaGrange, GA
 

It didn’t work, but I got our server admin to compile PHP by hand to install pdo_mysql. I tried to just upload those files and it didnt work, however when I completely deleted the installation, unzipped all fresh files and uploaded them I was able to make i tthrough the installation successfully (yay!)

I then saw errors in the shopping cart and some other sections. I saw in another post that changing mysqli to pdo_mysql in the config.xml file worked, so I tried it and voila! I’m running Magento!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mreigle
Jr. Member
 
Total Posts:  4
Joined:  2008-09-25
 

Same worked for me.  I recompiled PHP with PDO MySQL, set the proper php5.ini file and I was still receiving the error.

Then in config.xml I changed my <connection> settings to this and it works now:

<connection>
<types>
<pdo_mysql>
<class>Mage_Core_Model_Resource_Type_Db_Pdo_Mysql</class>
</pdo_mysql>
<mysqli>
<class>Mage_Core_Model_Resource_Type_Db_Pdo_Mysql</class>
</mysqli>
</types>
</connection>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top