Page 1 of 1

sql.safe_mode and mysqli (PHP 7.0.8)

Posted: Sat Aug 06, 2016 9:06 am
by bubblegum
Hello,

I came a cross this situation. I set the sql.safe_mode to ON in php.ini. The php code uses mysqli interface to connect to MySQL database. It is using the object version of mysqli. That means, the host, username and password is passed to the mysqli class constructor. With the sql.safe_mode = On, I would expect the host, username and password arguments to the mysqli class constructor would be ignored, and it would use the mysqli.default_host, default_user, default_pw instead. It turns out it is still using those arguments.

Is there anyone having similar situation?

I am using php 7.0.8 with Apache 2.4 (fpm-php). And it is running on Ubuntu Server 16.04.1 LTS.

Re: sql.safe_mode and mysqli (PHP 7.0.8)

Posted: Sat Aug 06, 2016 1:29 pm
by requinix
Apparently mysqli and some others don't check sql.safe_mode.