phpmysqli

Property access not allowed yet when using mysqli_init(). Trying to skip secure auth in php


I'm trying to skip secure authentication in php.

$con= mysqli_init();
mysqli_options( $con, "READ_MYSQLI_DEFAULT_FILE", "/etc/my.cnf" );
mysqli_real_connect( $con, "localhost", ....password,etc... )

When i debug in phpstorm, on the first line, mysqli_init fails and says property access is not allowed yet..


Solution

  • after finding this answer on SO: mysqli + xdebug breakpoint after closing statment result in many warnings

    it looks like its a bug in the mysqli driver, there was nothing wrong with the code or the connection however.