Ever come across an error like this(sql.safe):
Notice: SQL safe mode in effect - ignoring host/user/password information in [path]/adodb-mysql.inc.php on line 343
mysql_connect(): SQL safe mode in effect - ignoring host/user/password information in [path]/adodb- mysql.inc.php on line 339
The solution is straightforward.
In the php.ini file, set
[SQL] sql.safe_mode = Off
If sql.safe_mode is enabled, mysql_connect() and mysql_pconnect() ignore any arguments passed. Instead, PHP attempts to connect using the following details:
- host: local host
- user: the user PHP runs as
- password: an empty string (“”)
So all the MySQL connect functions will fail.