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 » Wed Jul 26, 2006 1:59 pm
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)
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Wed Jul 26, 2006 2:00 pm
Is your DB username mechacol_UEL by chance?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jul 26, 2006 2:00 pm
You might need to try
mysqli instead of mysql.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Wed Jul 26, 2006 2:01 pm
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.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Wed Jul 26, 2006 2:02 pm
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 » Wed Jul 26, 2006 2:16 pm
(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 » Wed Jul 26, 2006 2:38 pm
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
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Wed Jul 26, 2006 2:40 pm
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 » Wed Jul 26, 2006 2:44 pm
no my username is different, astions
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Wed Jul 26, 2006 2:48 pm
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 » Wed Jul 26, 2006 2:53 pm
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 » Wed Jul 26, 2006 3:02 pm
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
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Wed Jul 26, 2006 3:06 pm
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 » Wed Jul 26, 2006 3:51 pm
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 » Wed Jul 26, 2006 3:59 pm
ouch... scrap that last bit
username = root
password =
showed up with
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO)