The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL error

Discussion in 'General Discussion' started by Katy, Jul 17, 2006.

  1. Katy

    Katy Member

    Joined:
    Jul 17, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Finland
    Hello,
    I'm using some PHP/MySQL scripts on my site and when I try to instal them I always get this error:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/username/public_html/shoutbox/functions.php on line 79

    I used DirectAdmin before and everything worked just fine, but now I moved to another host and I'm using cPanel and I can't install any of my PHP/MySQL scrpts! A friend of mine said it's because of the PHP version I'm using and he said I'll need to replace that error line with something else, but I've no idea what to put there. Sorry, I'm not good at PHP. I hope someone can help me! Please!!! I'm stuck!!!
     
  2. Katy

    Katy Member

    Joined:
    Jul 17, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Finland
    I've no idea what PHP version I was using before, but now I'm using 4.4.2 Thank you! I think I'll need to find some new scripts... :confused:
     
  3. hamper

    hamper Well-Known Member

    Joined:
    Apr 28, 2006
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    You should really contact your hosting provider to ask them what version of PHP you're running. If they've updated recently, many older scripts will not run now and need to be
    rewritten a wee bit. In that case, you'll need to either write them or hire someone to rewrite them or find another newer free download.

    --
    EZ Web Solutions
    http://ezwebsol.com
    EZ Quality Hosting
    -- making your life EZ on the net...
     
  4. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    the error is because of a failed mysql query, are your database names, usernames and passwords correct in your scripts?

    cpanel prefixes your hosting account username onto the beginning of your databases and usernames followed by an underscore.

    for example if i added nickp666 as a database and my hosting username was user the database would be called user_nickp666, the same applies to mysql users
     
  5. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    In addition to what nick666 said, creating a db and user is a 3 step process in which the 3rd step is often forgotten.

    1. Create DB
    2. Create user
    3. Assign user to db
     
Loading...

Share This Page