• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 The Following server error has occured..

Richie

New member
#1
Hey Guys, Just just after importing all VB data and just trying to to house keeping.

I am getting the following error every so often, any thoughts?

An exception occurred: mysqli_stmt::bind_result(): Server returned unknown type 246. Probably your client library is incompatible with the server version you use! in /usr/local/pem/vhosts/114767/webspace/httpdocs/forum/library/Zend/Db/Statement/Mysqli.php on line 255

  1. XenForo_Application::handlePhpError()
  2. mysqli_stmt->bind_result()
  3. call_user_func_array() in Zend/Db/Statement/Mysqli.php at line 255
  4. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  5. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  6. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 753
  7. Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/Forum.php at line 700
  8. XenForo_Model_Forum->getForumCounters() in XenForo/DataWriter/Forum.php at line217
  9. XenForo_DataWriter_Forum->rebuildCounters() in XenForo/Deferred/Forum.php at line 34
  10. XenForo_Deferred_Forum->execute() in XenForo/Deferred/Atomic.php at line 61
  11. XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 208
  12. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 331
  13. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 284
  14. XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
  15. XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() inXenForo/ViewRenderer/Json.php at line 147
  16. XenForo_ViewRenderer_Json::_addDefaultParams() in XenForo/ViewRenderer/Json.php at line 185
  17. XenForo_ViewRenderer_Json::jsonEncodeForOutput() in XenForo/ViewRenderer/Json.phpat line 37
 

Brogan

XenForo moderator
Staff member
#2
The text at the top hints as to what the issue might be:

Probably your client library is incompatible with the server version you use! in /usr/local/pem/vhosts/114767/webspace/httpdocs/forum/library/Zend/Db/Statement/Mysqli.php on line 255
You may need to update your server.
 

Mike

XenForo developer
Staff member
#10
You're running MySQL 5.0, but your PHP MySQLi extension is compiled against MySQL 4.1. You'd need to update the MySQLi bindings to fit with your MySQL version. This is something your host should be able to do. This generally shouldn't happen unless the server has been updated piecemeal over time.

(This isn't something we can detect and it's possible that this error is simply masking another error.)
 

Mike

XenForo developer
Staff member
#12
I just realized that your MySQL server is separate from your PHP server. That's how that could happen. Strictly speaking you could create a MySQL 4 DB but that's below our minimum requirements. Your host really needs to update their MySQL bindings in PHP. (AFAIK, newer ones should generally work with older servers but not necessarily vice version.

(It's worth noting that the last update to MySQL 4.1 was 2008 and MySQL 5.0 has been considered production ready since 2005...)
 
#13
So I got this back from my host:

Hi Richie

I am afraid not, because there are limitation on shared hosting and we cannot allow one use to compile PHP because this will effect all the other users on the same server.
Any suggestions as what to do next?
 
#15
Switch hosting providers. Use Mike Edge's hosting services.
Its not that simple as I have a few websites email accounts with this host. When I ran the test script with Xenforo and it gave the all clear... I would have thought that I would not have needed to move host for it to work without errors.
 

Mike

XenForo developer
Staff member
#16
I wasn't really suggesting that YOU compile it (unless you had root access). It's something they should be doing for you because they've set themselves up with incompatible libraries. There are more details of what's happening here: http://stackoverflow.com/questions/1786654/mysqli-server-returned-unknown-type-246

Unfortunately, as I noted, it's not something that's easy to detect as in the vast majority of cases things like this will never come up -- this is definitely the first time I've ever seen it in terms of XF -- and accessing new servers with old clients is bound to potentially create problems like this. The issue isn't one that we can do anything to workaround; it's simply down to the library mismatch. All they need to do is make sure that PHP is actually using the libraries that correspond to the MySQL server version that they're connecting to.
 
#17
I wasn't really suggesting that YOU compile it (unless you had root access). It's something they should be doing for you because they've set themselves up with incompatible libraries. There are more details of what's happening here: http://stackoverflow.com/questions/1786654/mysqli-server-returned-unknown-type-246

Unfortunately, as I noted, it's not something that's easy to detect as in the vast majority of cases things like this will never come up -- this is definitely the first time I've ever seen it in terms of XF -- and accessing new servers with old clients is bound to potentially create problems like this. The issue isn't one that we can do anything to workaround; it's simply down to the library mismatch. All they need to do is make sure that PHP is actually using the libraries that correspond to the MySQL server version that they're connecting to.
Thanks @Mike , would it be an option to set up a database using on of the other options as per screenshot below. These were my options when creating a new database for xenforo and I selected the second option.

 
#19
Hmm, right so I am up ssss*it creek without a paddle.

I will mention all of the above to my hosting company and see what they say.
 

Mike

XenForo developer
Staff member
#20
If you can't reach a resolution with them (and unfortunately, I don't think it's likely), submit a ticket with us and we can look at the options.