some help please!! Warning: mysql_fetch_array(): suppl

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

php 4.4.2

mysql 4.1.20=standar-log


(i was typing in my correct username and password Daedalus - that was just spoof information)
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Is your DB username mechacol_UEL by chance?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You might need to try mysqli instead of mysql.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You know, it did not clarify that for him.

dandare, in my code sample, replace the db parameters with your actual login details. Sorry about that. :oops:
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Can you get into your database with phpMyAdmin?
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

(correction on the last post i made - i WASN'T typing in my correct user/password details)

yes, my database name is mechacol_UEL, astions

Feyd i will try replacing mysql to mysqli in a second


Everah i DID replace the db lines with my correct details and I can access the database through phpmyadmin
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

Feyd

I got back the:

Fatal error: Call to undefined function: mysqli_connect() in ..... line 6


when i tried mysqli

hmm

i have know idea what it can be :roll:
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

dandare wrote:yes, my database name is mechacol_UEL
I meant your username..
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

no my username is different, astions
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Try using the username root with a blank password, which is what phpMyAdmin uses by default.
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

Anyone think that it maybe to do with the php.ini file?

Only prroblem is I wouldn't think the company I purchased hosting with would offer both php and mysql without it being configured correctly :?
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

Sorry astions,

do you mean using the correct usernem wit a blank password field? (within the con.php file)

if so i have tried that and it recognises when the password is incorrect or blank
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Blank password with root as the username
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

ok i phoned up the hosting company. They suggested creating an new user and password for the database which kind of work.

It stated 'We're in' but it couldn't retrieve data.

Also tried root and no password which took me to the php version screen.
dandare
Forum Commoner
Posts: 26
Joined: Wed Jul 26, 2006 7:56 am
Location: London

Post by dandare »

ouch... scrap that last bit

username = root
password =

showed up with
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO)
Post Reply