SQL safe mode in effect errors

Sql.safe mode Errors

If you have any mysql connection errors and received error with cpanel user name authentication errors. If sql.safe_mode is enabled, mysql_connect() and mysql_pconnect() ignore any arguments passed to them. Instead, PHP attempts to connect using the following details:

host: local host
user: the user PHP runs as
password: an empty string (“”)

For example,

Notice: SQL safe mode in effect – ignoring host/user/password information in

mysql_connect(): SQL safe mode in effect – ignoring host/user/password information in

This is caused due to your php.ini sql safe mode settings.

Login your php.ini file.

vi /usr/local/lib/php.ini

and turn off sql.safe mode.

sql.safe_mode  = Off

Restart apache

/etc/init.d/httpd restart


Thats all!!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

cPHulk Brute Force Protection

WHM/cPanel has a service, protected from Brute Force attack, which is called “cPHulk Brute Force...

Enable SSH key authorized login without root password

You need to generate SSH Key ( the private key )on your cpanel server and then update remote...

How can I Redirect URLs in cPanel

Login your cpanel 1. Click the Redirects button on the front page under the “domains” 2. Enter...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

ConfigServer Firewall CSF installation

ConfigServer firewall is a popular linux firewall security suite. It is easy to install, flexible...

Powered by WHMCompleteSolution