php.net |  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 (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.3.3 OS: Debian 5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: admin at webdesignforall dot net
New email:
PHP Version: OS:

 

 [2010-07-25 02:32 UTC] admin at webdesignforall dot net
Description:
------------
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:
---------------
<?php
$link1 = new mysqli("localhost","root","","dba");
$link1->query("SELECT 'test'", MYSQLI_ASYNC);
$done=false;
do
{
  $links = $errors = $reject = array();
  $links[] = $errors[] = $reject[] = $link1;
  if (!mysqli::poll($links, $errors, $reject, 1)) {
        continue;
    }
    if ($result = $links[0]->reap_async_query()) {
        $done=true;
        }
}
while(!$done);


Expected result:
----------------
No output.

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-25 18:34 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2010-07-25 18:34 UTC] johannes@php.net
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] degeberg@php.net
-Status: Bogus +Status: Verified
 [2010-07-26 11:26 UTC] degeberg@php.net
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] kalle@php.net
-Status: Verified +Status: Assigned -Assigned To: +Assigned To: kalle
 [2010-07-27 00:40 UTC] kalle@php.net
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] andrey@php.net
Automatic comment from SVN on behalf of andrey
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302177
Log: Fix for bug #52433 Call to undefined method mysqli::poll()
 [2010-08-13 11:18 UTC] andrey@php.net
-Status: Assigned +Status: Closed -Assigned To: kalle +Assigned To: andrey
 [2010-08-13 11:18 UTC] andrey@php.net
Thank you.
The fix will appear in 5.3.4 . The method will be static.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC