fatal error undefined mysql_connect - somebody please help!

ellis123

Registered
Jun 27, 2010
3
0
51
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
 

ellis123

Registered
Jun 27, 2010
3
0
51
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
 
Last edited:

Infopro

Well-Known Member
May 20, 2003
17,112
514
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
hey thanks for the reply.. this problem is really driving me round the bend.
Let's hope I don't help push you off the cliff..

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),
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

created a database,
elliss123_ellissdatabase

gave it a name, user and password,
ellis123_ellis123 (assuming your cpanel name and user for DB are the same in this example)
yourpassword
elliss123_ellissdatabase

i then went into myphpadmin and put files into the databases i created...
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.

i typed in the web address using my domain name, clicked the file, logged in and it open up...
So it half worked, the landing page for this script does open I take it. SO some of the DB must be working.

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
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
 

ellis123

Registered
Jun 27, 2010
3
0
51
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!
 
Last edited:

Spiral

BANNED
Jun 24, 2005
2,020
8
193
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...
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