
August 2nd, 2004, 07:29 AM
|
|
Registered User
|
|
Join Date: Jun 2002
Location: UK
Posts: 15
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
PHP SQL safe mode - Notice
Hi Guys
I have just installed PHP5 on my linux box and I'm geting a notice.
Notice: mysql_connect() [function.mysql-connect]: SQL safe mode in effect - ignoring host/user/password information in /var/www/htdocs/classfiles/DatabaseClass.php on line 22
I have defined my db var's as in a db.inc file.
PHP Code:
// Define Database Conection
define('DATABASE_NAME', 'blala');
define('DATABASE_URL', 'localhost');
define('DATABASE_LOGIN_NAME', 'balal');
define('DATABASE_PASSWORD', 'password');
DatabaseClass.php this is where the contants are being used in my DAL.
PHP Code:
class database {
// This sets a link to the database
function getDBConn() {
$link = mysql_connect(DATABASE_URL, DATABASE_LOGIN_NAME, DATABASE_PASSWORD)or die("Could not connect to server!");
if (DATABASE_NAME != "" && $link) {
mysql_select_db(DATABASE_NAME)or die("Could not connect to database");
}
return $link;
}
etc...
Anyone got any idea's as to why safe mode is giving me this error notice?
retro

|