Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
PHP Troubles
Results 1 to 5 of 5

Thread: PHP Troubles

  1. #1
    Mentor coltrane's Avatar
    Join Date
    May 2001
    Location
    North Carolina
    Posts
    1,390

    PHP Troubles

    Classic SQL connection problems
    I have even gone so far as to use this as a syntax :

    <?php

    $link = mysql_connect("mysql_host", "mysql_login", "mysql_password&quot
    or die("Could not connect"
    print "Connected successfully";
    mysql_select_db("my_database&quot
    or die("Could not select database"


    ?>

    and I STILL get

    Warning: Access denied for user: 'root@localhost' (Using password: NO) in /var/www/html/hello.php on line 19

  2. #2

    Re: PHP Troubles

    I'm not an expert, but I think you have to configure your user rights for mysql. you have to give root a password, and you have to use it

    Don't ask me how to do that, though. I've only had to do it twice, and I always forget the day after and end up asking njcajun from LNO how to do it

  3. #3
    Mentor coltrane's Avatar
    Join Date
    May 2001
    Location
    North Carolina
    Posts
    1,390

    Re: PHP Troubles

    Ive done that already.

    I mean, it doesnt matter WHAT i put in the connect syntax, I get the same error.

  4. #4
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re: PHP Troubles

    Code:
    $link=mysql_connect("localhost", "root", "") or die("Error connecting");
    Should work, you'sure you havn't assigned a password for root?, and that you can connect to the mysql-db with: mysql -u root -p ? With no password given at the prompt.
    This is why the error your talking about happens:
    Redhead@smaug{103} ~> mysql -u root -p
    Enter password:
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

    Redhead@smaug{105} ~> mysql -u root -p
    Enter password: <my secret password>
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 251 to server version: 3.23.37

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer

    mysql>
    Seems like your mysql-db want's a password for root, but you leave it blank.

  5. #5
    Mentor coltrane's Avatar
    Join Date
    May 2001
    Location
    North Carolina
    Posts
    1,390

    Re: PHP Troubles

    ummm

    the php file was owned by root, and not the users group

    that caused the problem

    Im going to sleep now...............

Similar Threads

  1. MSN Troubles (SOLVED)
    By -=<Night Wolf>=- in forum Windows - General Topics
    Replies: 0
    Last Post: 07-25-2005, 10:39 AM
  2. alsa troubles
    By BurntAsh in forum Linux - General Topics
    Replies: 11
    Last Post: 04-20-2004, 10:24 PM
  3. Troubles with IDE Channels
    By Rastar in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 01-25-2003, 07:21 PM
  4. PCMCIA troubles
    By kenshi in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 11-08-2002, 05:22 PM
  5. HD troubles
    By CP in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 04-13-2002, 11:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •