Warning: mysqli_stmt::bind_result() [function.bind-result]: Server returned unknown type 246

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning: mysqli_stmt::bind_result() [function.bind-result]: Server returned unknown type 246

Steve Uplift
Hi,

I have been using the PDO_MYSQL adapter for some time now with no problems. I am writing an application for a client who cannot enable the PDO MYSQL driver, so when version 0.9 came along with MYSQLI support i thought i would give it a go.

I am connecting to the database with no problems but when i try to execute a query using Zend_Db_Select i get this error message:

Warning: mysqli_stmt::bind_result() [function.bind-result]: Server returned unknown type 246. Probably your client library is incompatible with the server version you use! in /clientdata/clients/i/n/infexiousaudio.com/www/framework/Zend/Db/Statement/Mysqli.php on line 169

This is the code i have written which produces this message:

$select = $database->select();
$select->from('Shop_MP3s', '*');
$select->order('Label_ID');
$sql = $select->__toString();
$mp3Rows = $database->fetchAll($sql);

I have written this code many times before for the PDO_MYSQL driver before with no problems. The PHP version is 5.1.2

If anyone has any sugesstions would be greatly appreciated!

Thanks for your time

Steve
Reply | Threaded
Open this post in threaded view
|

RE: Warning: mysqli_stmt::bind_result() [function.bind-result]: Server returned unknown type 246

Bill Karwin from Zend
Zend Framework minimum version of PHP is 5.1.4, but it is highly
recommended to use PHP 5.2.1 because of many recent improvements.

Googling for this error, I see quite a few people having similar trouble
using DECIMAL datatypes with older versions of the MySQL Connector/J
JDBC driver.  So it could be that the MySQL server has upgraded their
protocol but older clients don't understand some of the data being sent.

I would suggest trying this with PHP 5.2.1.

Regards,
Bill Karwin

> -----Original Message-----
> From: Steve Uplift [mailto:[hidden email]]
> Sent: Saturday, March 24, 2007 11:39 AM
> To: [hidden email]
> Subject: [fw-db] Warning: mysqli_stmt::bind_result() [function.bind-
> result]: Server returned unknown type 246
>
>
> Hi,
>
> I have been using the PDO_MYSQL adapter for some time now with no
> problems.
> I am writing an application for a client who cannot enable the PDO
MYSQL
> driver, so when version 0.9 came along with MYSQLI support i thought i
> would
> give it a go.
>
> I am connecting to the database with no problems but when i try to
execute
> a
> query using Zend_Db_Select i get this error message:
>
> Warning: mysqli_stmt::bind_result() [function.bind-result]: Server
> returned
> unknown type 246. Probably your client library is incompatible with
the
> server version you use! in
>
/clientdata/clients/i/n/infexiousaudio.com/www/framework/Zend/Db/Stateme
nt

> /Mysqli.php
> on line 169
>
> This is the code i have written which produces this message:
>
> $select = $database->select();
> $select->from('Shop_MP3s', '*');
> $select->order('Label_ID');
> $sql = $select->__toString();
> $mp3Rows = $database->fetchAll($sql);
>
> I have written this code many times before for the PDO_MYSQL driver
before

> with no problems. The PHP version is 5.1.2
>
> If anyone has any sugesstions would be greatly appreciated!
>
> Thanks for your time
>
> Steve
> --
> View this message in context: http://www.nabble.com/Warning%3A-
> mysqli_stmt%3A%3Abind_result%28%29--function.bind-result-%3A-Server-
> returned-unknown-type-246-tf3459740s16154.html#a9652947
> Sent from the Zend DB mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

RE: Warning: mysqli_stmt::bind_result() [function.bind-result]: Server returned unknown type 246

Bill Karwin from Zend
Checking back into past binary downloads from PHP.net, it appears that
the MySQL client compiled into the php_mysqli.dll file is as follows:

PHP-5.1.2/ext/php_mysqli.dll: MySQL client 4.1.7
PHP-5.1.3/ext/php_mysqli.dll: MySQL client 4.1.7
PHP-5.1.4/ext/php_mysqli.dll: MySQL client 4.1.7
PHP-5.1.5/ext/php_mysqli.dll: MySQL client 5.0.22
PHP-5.1.6/ext/php_mysqli.dll: MySQL client 5.0.22
PHP-5.2.0/ext/php_mysqli.dll: MySQL client 5.0.22
PHP-5.2.1/ext/php_mysqli.dll: MySQL client 5.0.22

(I'm inferring this by running 'strings' on the dll.)

Here's another reference that supports the fact that the MySQL 4.1
client does not support the MySQL 5.0 DECIMAL datatype:
http://bugs.mysql.com/bug.php?id=9491

I conclude that if your MySQL Server is running 5.0, and you use the new
DECIMAL datatype, you should upgrade PHP to at least 5.1.5.  But it is
strongly recommended to upgrade to 5.2.1 for all the other performance
improvements and bug fixes that have been added to the most recent
release.

Regards,
Bill Karwin

> -----Original Message-----
> From: Bill Karwin [mailto:[hidden email]]
> Sent: Saturday, March 24, 2007 12:05 PM
> To: [hidden email]
> Subject: RE: [fw-db] Warning: mysqli_stmt::bind_result()
[function.bind-
> result]: Server returned unknown type 246
>
> Zend Framework minimum version of PHP is 5.1.4, but it is highly
> recommended to use PHP 5.2.1 because of many recent improvements.
>
> Googling for this error, I see quite a few people having similar
trouble
> using DECIMAL datatypes with older versions of the MySQL Connector/J
> JDBC driver.  So it could be that the MySQL server has upgraded their
> protocol but older clients don't understand some of the data being
sent.

>
> I would suggest trying this with PHP 5.2.1.
>
> Regards,
> Bill Karwin
>
> > -----Original Message-----
> > From: Steve Uplift [mailto:[hidden email]]
> > Sent: Saturday, March 24, 2007 11:39 AM
> > To: [hidden email]
> > Subject: [fw-db] Warning: mysqli_stmt::bind_result() [function.bind-
> > result]: Server returned unknown type 246
> >
> >
> > Hi,
> >
> > I have been using the PDO_MYSQL adapter for some time now with no
> > problems.
> > I am writing an application for a client who cannot enable the PDO
> MYSQL
> > driver, so when version 0.9 came along with MYSQLI support i thought
i

> > would
> > give it a go.
> >
> > I am connecting to the database with no problems but when i try to
> execute
> > a
> > query using Zend_Db_Select i get this error message:
> >
> > Warning: mysqli_stmt::bind_result() [function.bind-result]: Server
> > returned
> > unknown type 246. Probably your client library is incompatible with
> the
> > server version you use! in
> >
>
/clientdata/clients/i/n/infexiousaudio.com/www/framework/Zend/Db/Stateme

> nt
> > /Mysqli.php
> > on line 169
> >
> > This is the code i have written which produces this message:
> >
> > $select = $database->select();
> > $select->from('Shop_MP3s', '*');
> > $select->order('Label_ID');
> > $sql = $select->__toString();
> > $mp3Rows = $database->fetchAll($sql);
> >
> > I have written this code many times before for the PDO_MYSQL driver
> before
> > with no problems. The PHP version is 5.1.2
> >
> > If anyone has any sugesstions would be greatly appreciated!
> >
> > Thanks for your time
> >
> > Steve
> > --
> > View this message in context: http://www.nabble.com/Warning%3A-
> > mysqli_stmt%3A%3Abind_result%28%29--function.bind-result-%3A-Server-
> > returned-unknown-type-246-tf3459740s16154.html#a9652947
> > Sent from the Zend DB mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

RE: Warning: mysqli_stmt::bind_result() [function.bind-result]: Server returned unknown type 246

Steve Uplift
Thanks very much that info helped a lot. Instead of upgrading my PHP version I changed the DECIMAL field to a FLOAT on the MYSQL 5 database and amended the code accordingly as my clients host is shared and it would have been difficult to upgrade right now. Everything works fine now.

Regards

Steve

Bill Karwin wrote
Checking back into past binary downloads from PHP.net, it appears that
the MySQL client compiled into the php_mysqli.dll file is as follows:

PHP-5.1.2/ext/php_mysqli.dll: MySQL client 4.1.7
PHP-5.1.3/ext/php_mysqli.dll: MySQL client 4.1.7
PHP-5.1.4/ext/php_mysqli.dll: MySQL client 4.1.7
PHP-5.1.5/ext/php_mysqli.dll: MySQL client 5.0.22
PHP-5.1.6/ext/php_mysqli.dll: MySQL client 5.0.22
PHP-5.2.0/ext/php_mysqli.dll: MySQL client 5.0.22
PHP-5.2.1/ext/php_mysqli.dll: MySQL client 5.0.22

(I'm inferring this by running 'strings' on the dll.)

Here's another reference that supports the fact that the MySQL 4.1
client does not support the MySQL 5.0 DECIMAL datatype:
http://bugs.mysql.com/bug.php?id=9491

I conclude that if your MySQL Server is running 5.0, and you use the new
DECIMAL datatype, you should upgrade PHP to at least 5.1.5.  But it is
strongly recommended to upgrade to 5.2.1 for all the other performance
improvements and bug fixes that have been added to the most recent
release.

Regards,
Bill Karwin

> -----Original Message-----
> From: Bill Karwin [mailto:bill.k@zend.com]
> Sent: Saturday, March 24, 2007 12:05 PM
> To: fw-db@lists.zend.com
> Subject: RE: [fw-db] Warning: mysqli_stmt::bind_result()
[function.bind-
> result]: Server returned unknown type 246
>
> Zend Framework minimum version of PHP is 5.1.4, but it is highly
> recommended to use PHP 5.2.1 because of many recent improvements.
>
> Googling for this error, I see quite a few people having similar
trouble
> using DECIMAL datatypes with older versions of the MySQL Connector/J
> JDBC driver.  So it could be that the MySQL server has upgraded their
> protocol but older clients don't understand some of the data being
sent.
>
> I would suggest trying this with PHP 5.2.1.
>
> Regards,
> Bill Karwin
>
> > -----Original Message-----
> > From: Steve Uplift [mailto:djuplift@rawelements.net]
> > Sent: Saturday, March 24, 2007 11:39 AM
> > To: fw-db@lists.zend.com
> > Subject: [fw-db] Warning: mysqli_stmt::bind_result() [function.bind-
> > result]: Server returned unknown type 246
> >
> >
> > Hi,
> >
> > I have been using the PDO_MYSQL adapter for some time now with no
> > problems.
> > I am writing an application for a client who cannot enable the PDO
> MYSQL
> > driver, so when version 0.9 came along with MYSQLI support i thought
i
> > would
> > give it a go.
> >
> > I am connecting to the database with no problems but when i try to
> execute
> > a
> > query using Zend_Db_Select i get this error message:
> >
> > Warning: mysqli_stmt::bind_result() [function.bind-result]: Server
> > returned
> > unknown type 246. Probably your client library is incompatible with
> the
> > server version you use! in
> >
>
/clientdata/clients/i/n/infexiousaudio.com/www/framework/Zend/Db/Stateme
> nt
> > /Mysqli.php
> > on line 169
> >
> > This is the code i have written which produces this message:
> >
> > $select = $database->select();
> > $select->from('Shop_MP3s', '*');
> > $select->order('Label_ID');
> > $sql = $select->__toString();
> > $mp3Rows = $database->fetchAll($sql);
> >
> > I have written this code many times before for the PDO_MYSQL driver
> before
> > with no problems. The PHP version is 5.1.2
> >
> > If anyone has any sugesstions would be greatly appreciated!
> >
> > Thanks for your time
> >
> > Steve
> > --
> > View this message in context: http://www.nabble.com/Warning%3A-
> > mysqli_stmt%3A%3Abind_result%28%29--function.bind-result-%3A-Server-
> > returned-unknown-type-246-tf3459740s16154.html#a9652947
> > Sent from the Zend DB mailing list archive at Nabble.com.