sql.safe_mode and mysqli (PHP 7.0.8)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
bubblegum
Forum Newbie
Posts: 1
Joined: Sat Aug 06, 2016 8:56 am

sql.safe_mode and mysqli (PHP 7.0.8)

Post 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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: sql.safe_mode and mysqli (PHP 7.0.8)

Post by requinix »

Apparently mysqli and some others don't check sql.safe_mode.
Post Reply