Need help pls give me a solution for this PHP file

Discussion in 'Scripts' started by Kevinwills, Jan 17, 2010.

  1. #1
    Please help me i dont know,what is 'root' in this file,that ive to change anything or ive to leave as it is.And where to put mysql database name,sql username & password in this .php file? Pls give me an example friends.I tried lot but failed.

    <?php
    
    // mod Gemorroj
    error_reporting(0);
    
    // õîñò, ïîüçîâàòåëü, ïàðîëü
    mysql_connect('localhost', 'root', '') or die('Could not connect');
    // èìÿ ÁÄ
    mysql_select_db('sea2') or die('Could not db');
    
    mysql_query('SET NAMES `utf8`');
    
    if ($_SERVER['HTTP_X_FORWARDED_FOR']) {
        $ip = mysql_escape_string($_SERVER['HTTP_X_FORWARDED_FOR']);
    }
    else
        if ($_SERVER['HTTP_CLIENT_IP']) {
            $ip = mysql_escape_string($_SERVER['HTTP_CLIENT_IP']);
        }
        else
            if ($_SERVER['REMOTE_ADDR']) {
                $ip = $_SERVER['REMOTE_ADDR'];
            }
    
    $time = time();
    $setting = mysql_query('SELECT * FROM `setting`');
    while ($set = mysql_fetch_assoc($setting)) {
        $setup[$set['name']] = $set['value'];
    }
    
    $hackmess = $setup['hackmess'];
    mb_internal_encoding('UTF-8');
    
    ?>
    Code (markup):
     
    Kevinwills, Jan 17, 2010 IP
  2. theivo

    theivo Well-Known Member

    Messages:
    238
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #2
    I thing you should try to put your user and pass here

    // õîñò, ïîüçîâàòåëü, ïàðîëü
    mysql_connect('localhost', 'DB_username', 'DB_PASS') or die('Could not connect');
    
    Code (markup):
    and database name

    
    // èìÿ ÁÄ
    mysql_select_db('DB_NAME') or die('Could not db');
    
    Code (markup):
     
    theivo, Jan 17, 2010 IP
  3. Kevinwills

    Kevinwills Peon

    Messages:
    177
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Now ill try & post here whether its working or not bro.Thank you very much for concerning my post.
     
    Kevinwills, Jan 17, 2010 IP
  4. Kevinwills

    Kevinwills Peon

    Messages:
    177
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Tried not working bro.
     
    Kevinwills, Jan 17, 2010 IP
  5. theivo

    theivo Well-Known Member

    Messages:
    238
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #5
    sorry to hear, but on these places is logical to put the needed info.
    Are you sure you writing your username and db-name in proper way

    something like
    basename_-_databasename
    db_username
     
    theivo, Jan 17, 2010 IP
  6. Kevinwills

    Kevinwills Peon

    Messages:
    177
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Bro theivo installation completed thank you,thank you very much for your suggestion,and it helped me to do the rest.I just forgot to remove one quote frm this file.
     
    Kevinwills, Jan 17, 2010 IP
  7. theivo

    theivo Well-Known Member

    Messages:
    238
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #7
    Glad to hear this :)

    All the best!
     
    theivo, Jan 18, 2010 IP