View Issue Details

IDProjectCategoryView StatusLast Update
0000906Xdebugpublic2014-03-12 21:53
Reporterfigi Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformNetbeans IDE 7.2.1OSwindows 7 
Product Version2.2.1 
Summary0000906: line by line trace with Xdebug causes problems with mysqli object values being set differently
Description

run a simple program to update database. Without the Xdebug trace, it runs smoothly and updates.

With Xdebug turned on, step by step tracing the mysqli update variables after an update to database - xdebug causes update variable to change from 1 (correct value) to -1 unexpectedly (incorrect value).

Steps To Reproduce

For example:

$q = "INSERT INTO users (first_name, last_name, email, pass, registration_date) VALUES ('$fn', '$ln', '$e', SHA1('$p'), NOW() )";

// Execute the query:
$mysqli->query($q);

if ($mysqli->affected_rows == 1) {

// Xdebug trace of object variable mysqli does show affected_rows is +1 but... it switches to -1 on the next step? so it jumps to the wrong execution line afterwards. Database does get updated despite issues from xdebug.

Additional Information

I noticed that xdebug step by step tracing on looping statements involving mysql execution code also causes sporadic problem with xdebug running and forcing the break of the loop at incorrect times.

Again, without xdebug running, the programs execute fine.

Perhaps my xdebug is set incorrectly to handle mysql?

Below is mysql settings dump from phpinfo():

mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $

Directive Local Value Master Value
mysql.allow_local_infile On On
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

mysqli
MysqlI Support enabled
Client API library version mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0

Directive Local Value Master Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off

TagsNo tags attached.
Operating Systemwindows 7
PHP Version5.4.3

Activities

derick

2012-12-24 12:57

administrator   ~0002404

I've noticed that MySQLi does many weird things, where accessing variables changes them. I would have to investigate whether that's the case here too - and if you could provide a full example (including insert statements), that would help a lot!

derick

2014-02-27 19:44

administrator   ~0002711

Can you please provide the feedback?

derick

2014-03-12 21:53

administrator   ~0002770

Closing this out as I can't reproduce it and no feedback was provided. Please re-open if this issue returns.

Issue History

Date Modified Username Field Change
2012-11-25 12:42 figi New Issue
2012-12-24 12:57 derick Note Added: 0002404
2012-12-24 12:57 derick Assigned To => derick
2012-12-24 12:57 derick Status new => feedback
2014-02-27 19:44 derick Note Added: 0002711
2014-03-12 21:53 derick Note Added: 0002770
2014-03-12 21:53 derick Status feedback => resolved
2014-03-12 21:53 derick Resolution open => unable to reproduce
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)