Can someone help me? Please!!!

Discussion in 'PHP' started by giovanni, Jan 28, 2007.

  1. #1
    I am installing a script and when I run install.php I get this error:


    Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in /home/world/public_html/p2c/install.php on line 13

    Warning: mysql_query(): A link to the server could not be established in /home/world/public_html/p2c/install.php on line 13
    Access denied for user 'nobody'@'localhost' (using password: NO) at line 13

    Install php has the following in it:

    <?



    include("includes/data_conn.php");





    $q1 = "DROP TABLE IF EXISTS contact";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE contact (

    postid int(10) unsigned NOT NULL auto_increment,

    name varchar(50) NOT NULL default '0',

    date varchar(20) NOT NULL default '',

    demail varchar(65) NOT NULL default '',

    subject varchar(100) NOT NULL default '',

    post text NOT NULL,

    PRIMARY KEY (postid))

    TYPE=MyISAM AUTO_INCREMENT=5 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);







    $q1 = "DROP TABLE IF EXISTS counter";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE counter (

    visits bigint(20) NOT NULL default '0')

    TYPE=MyISAM ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS faq";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE faq (

    faqid int(10) unsigned NOT NULL auto_increment,

    question text NOT NULL,

    answer text NOT NULL,

    category varchar(100) NOT NULL default '',

    PRIMARY KEY (faqid))

    TYPE=MyISAM AUTO_INCREMENT=3 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "INSERT INTO faq VALUES (3, 'Am I allowed to have more than one account?', 'We only allow one advertiser and one member account per person. You may have more than one account per household, however using the same IP will cause problems with our anti-cheating system.', 'General FAQs')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq VALUES (4, 'Do you allow International users?', 'Yes, we accept users and advertisers whose countries who are qualified to use PayPal. ', 'General FAQs')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq VALUES (5, 'Can I cancel my account?', 'Yes, please send a request to support if you wish to cancel your account. You must include your PayPal email address so we can verify your identity. Funds over $25 will be deposited to your PayPal account. Funds under the payout rate of $25 are non payable.', 'General FAQs')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq VALUES (1, 'What is PaidTo Click?', 'PaidTo Click, is an exciting opportunity that brings advertisers and consumers together. Advertisers can bid on links and post banners for members to review. Members then receive a rate per click rate that is predetermined by the advertiser. After a member clicks on that link and views the site for the advertiser determined amount of time, the member is credited that click amount.', 'General FAQs')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq VALUES (7, 'What advertising programs do you offer?', 'We offer two types of advertising programs. Pay-Per-Click and Banner Impressions.', 'Advertisers')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq VALUES (8, 'How are you different from other Paid-To-Surf programs?', 'Other paid to search programs run on an automated system where members can sign up and begin surfing. However these programs use timed systems that refresh new sites without any interaction from the surfer. Therefore users can let the surfing program run without even being seated at a computer! These program also usually just offer a traffic exchange. Where we excel in Paid-To-Click is by requiring members to manually click on a website link. The link then opens in a new window and credit is not given to the member until the pre-determined amount of time for the credit has passed. Plus our anti-cheat system only allows one credit visit to a site per member.', 'Advertisers')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq VALUES (9, 'Who determines the prices for my website links?', 'All advertisers determine the payout rate for members clicking on their links. The more an advertiser bids the more clicks that link will receive. Plus advertisers have the option of purchasing features to make their links more noticeable such as Bolding and Italics.', 'Advertisers')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq VALUES (10, 'Who determines the pre-determined amount of time that a member must visit a site to receive credit?', 'Advertisers determine the amount of time they require a member to surf their site to receive credit. The times range from 1 second to 30 seconds.', 'Advertisers')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS faq_sections";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE faq_sections (

    cat_id int(10) unsigned NOT NULL auto_increment,

    name varchar(100) NOT NULL default '',

    PRIMARY KEY (cat_id))

    TYPE=MyISAM AUTO_INCREMENT=2 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "INSERT INTO faq_sections VALUES (2, 'General FAQs')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO faq_sections VALUES (3, 'Advertisers')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS faqs";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE faqs (

    faqid int(10) unsigned NOT NULL auto_increment,

    category varchar(60) NOT NULL default '',

    question text,

    answer text,

    PRIMARY KEY (faqid))

    TYPE=MyISAM AUTO_INCREMENT=1 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS links";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE links (

    linkid int(10) unsigned NOT NULL auto_increment,

    addr varchar(255) NOT NULL default '',

    username varchar(20) NOT NULL default '',

    title varchar(50) NOT NULL default '',

    total varchar(10) NOT NULL default '',

    perclick varchar(10) NOT NULL default '',

    hits int(10) NOT NULL default '0',

    bold tinyint(2) NOT NULL default '0',

    italic tinyint(1) NOT NULL default '0',

    timer int(10) NOT NULL default '0',

    status varchar(50) NOT NULL default '',

    owe varchar(15) NOT NULL default '',

    PRIMARY KEY (linkid))

    TYPE=MyISAM AUTO_INCREMENT=5 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "INSERT INTO links VALUES (5, 'www.turnkeyzone.com/demos/font', 'crash', 'Free Fonts', '99.98', '0.02', 2, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (6, 'www.turnkeyzone.com/demos/templates', 'crash', 'Custom Templates', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (7, 'www.datacryp.com', 'crash', 'Data Encryption', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (8, 'www.traffic-jam.ca', 'crash', 'Web Design', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (9, 'www.casheer.com', 'crash', 'Casheer Payment\'s', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (10, 'www.vinyl-dog.ca', 'crash', 'Vinyl-Dog Cartoons', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (11, 'www.virtualmarketingcenter.com', 'crash', 'Website Marketing', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (12, 'www.hypershack.com', 'crash', 'Reseller Hosting', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);

    $q1 = "INSERT INTO links VALUES (13, 'www.exitdevil.com', 'crash', 'Free Traffic', '99.98', '0.02', 1, 0, 0, 5, 'active', '0')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);









    $q1 = "DROP TABLE IF EXISTS main";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE main (

    username varchar(50) NOT NULL default '',

    password varchar(50) NOT NULL default '',

    title varchar(75) NOT NULL default '',

    baseurl varchar(100) NOT NULL default '',

    rooturl varchar(100) NOT NULL default '',

    adminemail varchar(100) NOT NULL default '',

    newsemail varchar(100) NOT NULL default '',

    paypalemail varchar(100) NOT NULL default '',

    linkcharge varchar(50) NOT NULL default '',

    bannercharge varchar(50) NOT NULL default '',

    withdraw varchar(50) NOT NULL default '',

    bold varchar(50) NOT NULL default '',

    italic varchar(50) NOT NULL default '',

    referral varchar(50) NOT NULL default '',

    PRIMARY KEY (username))

    TYPE=MyISAM";







    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "INSERT INTO main VALUES ('admin', 'admin', 'My Paid to Click', 'http://www.mydomain.com/', '/home/username/public_html/', 'neo@cyberia.ca', 'donotreply@cyberia.ca', 'neo@cyberia.ca', '1.00', '20.00', '25.00', '1.00', '1.00', '0.25')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS n_ban";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE n_ban (

    banid int(10) NOT NULL auto_increment,

    username varchar(50) NOT NULL default '',

    title varchar(100) NOT NULL default '',

    banname varchar(100) NOT NULL default '',

    date varchar(50) NOT NULL default '',

    status varchar(25) NOT NULL default '',

    addr varchar(200) NOT NULL default '',

    views int(10) NOT NULL default '0',

    PRIMARY KEY (banid))

    TYPE=MyISAM AUTO_INCREMENT=3 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS newl";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE newl (

    linkid int(10) unsigned NOT NULL auto_increment,

    fname varchar(50) NOT NULL default '',

    lname varchar(50) NOT NULL default '',

    email varchar(60) NOT NULL default '',

    username varchar(20) NOT NULL default '',

    password varchar(20) NOT NULL default '',

    PRIMARY KEY (linkid))

    TYPE=MyISAM AUTO_INCREMENT=6 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "INSERT INTO newl VALUES (6, 'UNTIL YOU HAVE ADDED YOUR OWN LINKS', 'DO NOT DELETE', 'neo@cyberia.ca', 'crash', 'password')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS pages";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE pages (

    page varchar(50) NOT NULL default '',

    p_content longtext NOT NULL,

    title varchar(100) NOT NULL default '')

    TYPE=MyISAM";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS payment";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE payment (

    payid int(10) NOT NULL auto_increment,

    name varchar(50) NOT NULL default '',

    amount varchar(10) NOT NULL default '',

    date varchar(15) NOT NULL default '',

    reason varchar(50) NOT NULL default '',

    PRIMARY KEY (payid))

    TYPE=MyISAM AUTO_INCREMENT=3 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "INSERT INTO payment VALUES (3, 'crash', '1000000000', '10/31/2003', 'Test Account for starter links')";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS users";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE users (

    userid int(10) unsigned NOT NULL auto_increment,

    fname varchar(50) NOT NULL default '',

    lname varchar(50) NOT NULL default '',

    name varchar(20) NOT NULL default '',

    email varchar(60) NOT NULL default '',

    password varchar(20) NOT NULL default '',

    earned varchar(20) NOT NULL default '',

    visited longtext NOT NULL,

    refer varchar(100) NOT NULL default '',

    joined varchar(25) NOT NULL default '',

    PRIMARY KEY (userid))

    TYPE=MyISAM AUTO_INCREMENT=7 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    $q1 = "DROP TABLE IF EXISTS withdraw";

    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);



    $q1 = "CREATE TABLE withdraw (

    wid int(10) unsigned NOT NULL auto_increment,

    user varchar(25) NOT NULL default '',

    method varchar(25) NOT NULL default '',

    account varchar(100) NOT NULL default '',

    amount varchar(15) NOT NULL default '',

    date varchar(25) NOT NULL default '',

    status varchar(25) NOT NULL default '',

    PRIMARY KEY (wid))

    TYPE=MyISAM AUTO_INCREMENT=2 ";



    mysql_query($q1) or die(mysql_error()." at line ".__LINE__);





    echo "<br><br><center><font face=verdana size=2 color=black><b>The site was installed successfully!<br><br>Delete this file from your server!</b><br><P>Visit your admin area to moderate your site:<BR><a href=\"control/\"> Site Admin</a><BR><P></font></center>";





    ?>

    HOW CAN I FIX THIS!?!?!?
     
    giovanni, Jan 28, 2007 IP
  2. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #2
    Try opening the 'includes/data_conn.php' file and entering the correct username, password and database name for your server.
     
    SilkySmooth, Jan 28, 2007 IP
  3. riya_senk

    riya_senk Well-Known Member

    Messages:
    2,014
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Yes. You must enter valid data for connection before installation.
     
    riya_senk, Jan 28, 2007 IP
  4. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Before running the install script, you would have needed to create an empty database for use by the script. After creating the database you need to associate a user with that database and give that user all rights. I always create a new user for each database that I create so that if someone manages to break into one, they do not own all my databases.

    There will be a configuation file for your script. That file needs to contain the name of the database, the name of use who can access and that users correct password. Providing those three pieces of information should allow the install to access your databases and create tables needed by the scripts.
     
    clancey, Jan 28, 2007 IP
  5. Ziki

    Ziki Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Make sure no password is entered and that account has the needed priviliges
     
    Ziki, Jan 29, 2007 IP
  6. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #6
    no password???
     
    SilkySmooth, Jan 29, 2007 IP
  7. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Free help:

    - Use proper thread titles
    - Put PHP code in
     tags
    - USE PROPER THREAD TITLES
    PHP:
     
    Icheb, Jan 29, 2007 IP
  8. Ziki

    Ziki Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    (using password: NO) means the user doesn't use a password
     
    Ziki, Jan 29, 2007 IP
  9. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #9
    I am well aware of what (using password: NO) means, the way you typed your post made it look like you were telling him not to enter a password into his script.
     
    SilkySmooth, Jan 29, 2007 IP
  10. Ziki

    Ziki Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I am telling him that the password variables should be left empty

    EDIT: Nvm I'm sorry you are right.I was thinking about something else :D
     
    Ziki, Jan 29, 2007 IP
  11. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #11
    I was just about to say are you crazy LoL
     
    SilkySmooth, Jan 29, 2007 IP
  12. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #12
    It's not really crazy to have no MySQL password. In fact, the default user 'root' has no password by default.

    Admittedly this is all different on shared hosting but when you have a 'default' setup (where root can only access the DB from 'localhost', anyway) it's fairly secure as you have control over all of the scripts, anyway...

    Not that that will help the OP, but I just thought I would note that.
     
    TwistMyArm, Jan 29, 2007 IP
  13. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #13
    TMA,

    Yes, but most server admins will secure MySQL during install, although you would be surprised at some of the sites I have worked on with open access. :rolleyes:

    But anyway, I wasn't suggesting it is crazy the fact that a MySQL user does not have a password, but rather the assertion that (using password: NO) means a user doesn't have a password, when it simply means a password wasn't supplied....

    Anyway, we are deviating...

    giovanni, would be nice if you could come back and let us know if we resolved your problem.
     
    SilkySmooth, Jan 29, 2007 IP
  14. Ziki

    Ziki Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I was thinking about vbulletin config file
     
    Ziki, Jan 29, 2007 IP