Welcome to the Legend of mir forums. Mir Revenge.
Results 1 to 4 of 4
  1. #1
    Sable
    Guest

    Default PHP & mysql boffs.. attention plz :)

    tryin to connect to mysql through php using a new user blah blah. the user is set up fine, but im gettin this

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'php'@'localhost' (using password: YES) in C:\wamp\www\rar2.php on line 3

    anyone have n e ideas as to why its bein a bastard n not doin wht i want it to?

    will love you for eva if u find me a cure for this thing

    btw this is the script on the page lol

    <?php
    require($_SERVER["DOCUMENT_ROOT"] . "config/db_config.php");
    $connection = mysql_connect($db_host, $db_user, $db_password) or die("connection error");
    echo "connection made";
    ?>

    and yes everythin is set up right in the db_config file

  2. #2
    Forum Addict Array
    Join Date
    Nov 2008
    Posts
    700

    Default Re: PHP &amp; mysql boffs.. attention plz :)

    Echo the $db_host, $db_user etc variables between the require & $connection lines and see what they say. Also echo the $_SERVER["DOCUMENT_ROOT"] . "config/db_config.php" string and make sure that file exists.

    Important note, you should NOT have the db_config.php under the document root as that is world readable by the web server/clients. It should be outside the document root for security reasons.
    ________
    Old Man Young
    Last edited by U4ea; 15-05-11 at 10:19 PM.

  3. #3
    Sable
    Guest

    Default Re: PHP & mysql boffs.. attention plz :)

    when i try echo the variables it gives me a parse error.

    it connects ok when i use the root user.... but not when i use a custom made user. with or without a password.

  4. #4
    Sable
    Guest

    Default Re: PHP & mysql boffs.. attention plz :)

    okies it all seems to be working now ^^


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. it has come to my attention that......
    By Juice in forum Mir Extreme Archives.
    Replies: 17
    Last Post: 27-06-09, 07:23 PM
  2. someone who knows php
    By lapta in forum Mir Revenge - Aug 2007 - May 2010 Archives.
    Replies: 2
    Last Post: 13-05-09, 01:46 PM
  3. Grats mum&dad(Melody&Zatwizzard)
    By Laylee in forum Mir Revenge - Aug 2007 - May 2010 Archives.
    Replies: 32
    Last Post: 31-05-08, 11:49 AM
  4. Attention: Psymomo & GM team
    By ChaosNCarnage in forum Mir Revenge - Aug 2007 - May 2010 Archives.
    Replies: 5
    Last Post: 14-05-08, 10:05 PM

Tags for this Thread

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85