PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 2nd, 2004, 07:29 AM
retr0 retr0 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: UK
Posts: 15 retr0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy 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_URLDATABASE_LOGIN_NAMEDATABASE_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

Reply With Quote
  #2  
Old August 2nd, 2004, 07:58 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Notices are typically a function of your error reporting level set in php.ini. There have been several posts on this topic lately. Do a search here on "E_ALL" and see if that turns up one of the recent explanations for you.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > PHP SQL safe mode - Notice


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway