Edit report at https://bugs.php.net/bug.php?id=55104&edit=1

 ID:                 55104
 Updated by:         johan...@php.net
 Reported by:        1000235409 at smail dot shnu dot edu dot cn
 Summary:            Calling mysqli::get_attr() leads php to crash.
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            MySQLi related
 Operating System:   Mac OS X 10.6.7
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

This seems to be fixed in more recent 5.3 versions. I couldn't reproduce the 
issue. In case you can reproduce it with a recent version please tell use 
whether you're using libmysql or mysqlnd (check "MySQL CLient Library Version" 
in phpinfo() )


Previous Comments:
------------------------------------------------------------------------
[2011-07-03 11:21:35] 1000235409 at smail dot shnu dot edu dot cn

try it on 5.3.3, or is it meaningless?

------------------------------------------------------------------------
[2011-07-03 10:29:59] fel...@php.net

I can't reproduce it on 5.4.

------------------------------------------------------------------------
[2011-07-03 00:06:14] 1000235409 at smail dot shnu dot edu dot cn

I cannot generate a backtrace since I am not willing to mess up machine, and 
there 
is no possibility to install a virtual machine because I haven't a OS X Server 
installation DVD,

So, is it possible to solve this bug without providing a backtrace?

------------------------------------------------------------------------
[2011-07-01 11:48:16] ahar...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

------------------------------------------------------------------------
[2011-07-01 11:25:54] 1000235409 at smail dot shnu dot edu dot cn

Description:
------------
Calling mysqli::get_attr() under Mac OS X always leads php to crash with exit 
code 
139, even after receiving true with calling mysqli::set_attr() before.

Proved under PHP-CGI 5.3.3 with MySQL 5.1.44.

This situation will not happen under Windows and Linux (at least Ubuntu 10.10).

Test script:
---------------
$conn=new mysqli('localhost', 'root', '', 'test', 3306, 
'/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock');
$stmt=$conn->stmt_init();
$stmt->prepare('select 1+1');
$a=$stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE,MYSQLI_CURSOR_TYPE_READ_ONLY);
var_dump($a); //true
$stmt->attr_get(MYSQLI_STMT_ATTR_CURSOR_TYPE); //php crashed with exit value 
139.
$stmt->execute();
echo $stmt->attr_get(MYSQLI_STMT_ATTR_CURSOR_TYPE);// ...or, put that code 
here, and the same problem happens.
echo 'SUCC';

Expected result:
----------------
SUCC

Actual result:
--------------
*SIMPLY CRASHED*


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55104&edit=1

Reply via email to