View Issue Details

IDProjectCategoryView StatusLast Update
0001714XdebugStacktracespublic2019-10-12 18:58
ReporterRoze Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version2.8.0beta2 
Summary0001714: mysqli_options with xdebug.collect_params=3 and above creates Warning: Property access is not allowed yet
Description

I'm not exactly sure if it is the same bug as https://bugs.php.net/bug.php?id=67348 (also reported here https://stackoverflow.com/questions/29401923/property-access-not-allowed-yet-when-using-mysqli-init-trying-to-skip-secure ) which leads to next SO topic and then to https://github.com/php/php-src/commit/579562176b71820ad49d43b2c841642fef12fe57

But a simple:

<?php
$con = mysqli_init();
mysqli_options( $con, MYSQLI_OPT_CONNECT_TIMEOUT, 2);

with xdebug.collect_params=3 (0-2 work fine) and xdebug.auto_trace=1 (I imagine also any other way producing a trace) leads to Warning: mysqli_options(): Property access is not allowed yet in /data/php740/t.php on line 3

Call Stack:
0.0004 403328 1. {main}() /data/php740/t.php:0
0.0005 403792 2. mysqli_options(class mysqli { public $affected_rows = NULL; public $client_info = NULL; public $client_version = NULL; public $connect_errno = NULL; public $conne
ct_error = NULL; public $errno = NULL; public $error = NULL; public $error_list = NULL; public $field_count = NULL; public $host_info = NULL; public $info = NULL; public $insert_id = NULL;
public $server_info = NULL; public $server_version = NULL; public $sqlstate = NULL; public $protocol_version = NULL; public $thread_id = NULL; public $warning_count = NULL }, 0, 2) /data/ph
p740/t.php:3

The same thing in OOP style runs fine
<?php
$con = mysqli_init();
$con->options(MYSQLI_OPT_CONNECT_TIMEOUT, 2);
?>

PHP version 7.4.0RC3 (same with 7.3.10) with xdebug-2.8.0beta2 and 2.7.2

Steps To Reproduce

php -dzend_extension=xdebug.so -dxdebug.collect_params=3 -dxdebug.auto_trace=1 -r '$con=mysqli_init();mysqli_options($con,MYSQLI_OPT_CONNECT_TIMEOUT,2);'

TagsNo tags attached.
Operating System
PHP Version7.4-dev

Activities

derick

2019-10-11 17:04

administrator   ~0005171

This is not quite the same issue, but also not a bug in Xdebug. Even without Xdebug loaded (see the -n) and var_dump(), you'll see the same message:

Script


<?php
$con = mysqli_init();
mysqli_options( $con, MYSQLI_OPT_CONNECT_TIMEOUT, 2);
var_dump($con);

Output


derick@singlemalt:/tmp$ php -n test.php

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4

Warning: var_dump(): Property access is not allowed yet in /tmp/test.php on line 4
object(mysqli)#1 (18) {
["affected_rows"]=>
bool(false)
["client_info"]=>
string(17) "mysqlnd 7.4.0-dev"
["client_version"]=>
int(70400)
["connect_errno"]=>
int(0)
["connect_error"]=>
NULL
["errno"]=>
int(0)
["error"]=>
string(0) ""
["error_list"]=>
bool(false)
["field_count"]=>
bool(false)
["host_info"]=>
bool(false)
["info"]=>
bool(false)
["insert_id"]=>
bool(false)
["server_info"]=>
bool(false)
["server_version"]=>
bool(false)
["sqlstate"]=>
bool(false)
["protocol_version"]=>
bool(false)
["thread_id"]=>
bool(false)
["warning_count"]=>
bool(false)
}

You'll have to convince the mysqli driver authors to fix this one.

Roze

2019-10-12 18:58

reporter   ~0005173

I see, thank you for feedback.
Didn't test if with var_dump and the warning only started to appear when the collect_params was changed/increased. Let's see how it goes on bugs.php

p.s. out of curiosity why doesn't the OOP style trigger this with Xdebug while var_dump() still makes the Warning?

Issue History

Date Modified Username Field Change
2019-10-10 17:03 Roze New Issue
2019-10-11 17:04 derick Assigned To => derick
2019-10-11 17:04 derick Status new => resolved
2019-10-11 17:04 derick Resolution open => no change required
2019-10-11 17:04 derick Note Added: 0005171
2019-10-12 18:58 Roze Note Added: 0005173