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

 ID:                 55104
 User updated by:    1000235409 at smail dot shnu dot edu dot cn
 Reported by:        1000235409 at smail dot shnu dot edu dot cn
 Summary:            Calling mysqli::get_attr() leads php to crash.
-Status:             Feedback
+Status:             Open
 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:

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?


Previous Comments:
------------------------------------------------------------------------
[2011-07-01 11:48:16] [email protected]

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