|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52433 Call to undefined method mysqli::poll()
Submitted: 2010-07-25 02:32 UTC Modified: 2010-08-13 11:18 UTC
From: admin at webdesignforall dot net Assigned: andrey
Status: Closed Package: MySQLi related
PHP Version: 5.3.3 OS: Debian 5
Private report: No CVE-ID:
 [2010-07-25 02:32 UTC] admin at webdesignforall dot net
The static method mysqli::poll doesn't exist. Using it creates a Fatal error: Call 
to undefined method mysqli::poll() .

mysqli_poll works fine.

Test script:
$link1 = new mysqli("localhost","root","","dba");
$link1->query("SELECT 'test'", MYSQLI_ASYNC);
  $links = $errors = $reject = array();
  $links[] = $errors[] = $reject[] = $link1;
  if (!mysqli::poll($links, $errors, $reject, 1)) {
    if ($result = $links[0]->reap_async_query()) {

Expected result:
No output.

Actual result:
Fatal error: Call to undefined method mysqli::poll() 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-25 18:34 UTC]
-Status: Open +Status: Bogus
 [2010-07-25 18:34 UTC]
MySQLi asynchronous queries only exist if PHP was compiled using mysqlnd (--with-mysqli=myslqnd)
 [2010-07-26 04:11 UTC] admin at webdesignforall dot net
It is compiled with mysqlnd here is the configure line.

Configure Command =>  './configure'  '--prefix=/custom/php-5.3.3' '--with-
mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd'

Like I said mysqli_poll works fine just mysqli::poll doesn't, so there's 
something wrong with the mysqli class.
 [2010-07-26 11:26 UTC]
-Status: Bogus +Status: Verified
 [2010-07-26 11:26 UTC]
I can reproduce this using the latest revision in the 5.3 branch.

Procedural mode works, but OO mode gives a fatal error.
 [2010-07-27 00:40 UTC]
-Status: Verified +Status: Assigned -Assigned To: +Assigned To: kalle
 [2010-07-27 00:40 UTC]
I belive a fix here is pretty simple and is just a matter of adding a PHP_FALIAS macro within mysqli_fe.c to redirect the poll() call.

Ill try have a look at this issue this weekend
 [2010-08-13 11:18 UTC]
Automatic comment from SVN on behalf of andrey
Log: Fix for bug #52433 Call to undefined method mysqli::poll()
 [2010-08-13 11:18 UTC]
-Status: Assigned +Status: Closed -Assigned To: kalle +Assigned To: andrey
 [2010-08-13 11:18 UTC]
Thank you.
The fix will appear in 5.3.4 . The method will be static.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 16:01:33 2015 UTC