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.

fatal error undefined mysql_connect - somebody please help!

Discussion in 'Database Discussions' started by ellis123, Jun 27, 2010.

  1. ellis123

    ellis123 Registered

    Joined:
    Jun 27, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    hello everyone

    here is my problem

    >> fatal error undefined mysql_connect <<

    im an absolute noob. i've been trying all day and feel like i haven't even scratched the surface to this problem. its really frustrating. if somebody could help me, i'd really appreciate it

    thanks
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    It might help if you described what you're doing when you run into this error.
     
  3. ellis123

    ellis123 Registered

    Joined:
    Jun 27, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    hey thanks for the reply.. this problem is really driving me round the bend.

    i dont have it open at this minute, but logged into cpanel, i loaded my files into file manager, one of which asked me to fill in where it says something like mysql_connect (server, user, password, dbname), created a database, gave it a name, user and password, i then went into myphpadmin and put files into the databases i created...

    i typed in the web address using my domain name, clicked the file, logged in and it open up... but most i couldnt access most of the stuff on there because of the error message telling me "fatal error undefined mysql_connect" which leads back to this file i uploaded and the line where it says i should enter my (server, user, password, dbname)

    thanks for any help anyone can offer on this
     
    #3 ellis123, Jun 28, 2010
    Last edited: Jun 28, 2010
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Let's hope I don't help push you off the cliff..

    That file sounds like a config file of some sort. Can you mention the script you're trying to install, that might be more helpful.

    The answers to fill in for those are as follows:
    localhost
    ellis123_ellis123 (assuming your cpanel name and user for DB are the same in this example)
    yourpassword
    elliss123_ellissdatabase

    elliss123_ellissdatabase

    ellis123_ellis123 (assuming your cpanel name and user for DB are the same in this example)
    yourpassword
    elliss123_ellissdatabase

    Sounds to me (I'm guessing) this is where you may have gone wrong.
    What files are you putting in via PHPMyAdmin? Assuming .sql files?

    If you mention the script you're installing it might help.

    So it half worked, the landing page for this script does open I take it. SO some of the DB must be working.

    But this last part sounds like nothing is opening, not even the landing/default page for the script.

    Too many variables here to wonder which one is the cause of the problem I think.

    Is the DB created properly?
    Is the config file edited properly?
    Are you supposed to be uploading the .sql files to populate the database, or will running the script for the first time do that for you? Need to know the script to be sure.
    If you are supposed to upload them manually, are those .sql files in the proper format?

    Sorry, not sure I can help any more than that without a bit more Info. :p
     
  5. ellis123

    ellis123 Registered

    Joined:
    Jun 27, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    hey.. thanks for this very much. i really appreciate it!

    i've read through a few forums on covering the same problem and apparently there some mysql extension that needs to be installed/enabled or alternatively, something called PDO (PHP: PDO - Manual) could be used...

    would you know if there is any truth to this?

    thanks again for your help!
     
    #5 ellis123, Jun 28, 2010
    Last edited: Jun 28, 2010
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sounds to me like you'll need to rebuild Apache for this.
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If the program you are using is making PDO calls then yes you would actually need to install PDO and the PDO MySQL extensions.

    However, per your previous comments, I would be a bit leery asking you to try to do a full system rebuild on your own. As easy as Easy Apache is, I get the strong impression that might be something out of your understanding as you would need to know what to install and not install and why.

    I am just concerned that you go in there to try to install PDO, you'll either forget something needed or add something you shouldn't add and that can just drum up a whole new set of problems.

    To perhaps save you from potentially making more of a mess of things, if you like I'd be glad to rebuild your Apache for you with the PDO extensions and related components --- no charge.

    Otherwise, you will find 'EasyApache' in WHM or in the SSH shell as /scripts/easyapache
     
Loading...

Share This Page