Fresh XAMPP, latest Cont. Panel Apache OK, SQL ok CD db fail

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Fresh XAMPP, latest Cont. Panel Apache OK, SQL ok CD db fail

Postby hoytpr » 02. June 2011 23:50

I've used XAMPP in the past, but upgraded to latest version 1.7.4 (PHP 5.3.5, apache 2.0 handler) assuming it would be easy. Running Windows XP-x64. Had some problems but short story, the Control Panel 3 from May 13 (?) worked to allow me to start MySQl and Apache. Not running FTP or POP3. Changed root PW and XAMPP, MySQl and phpMy Admin all read secure.

If I then try to run the example "CD database" I get the following error:
"Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\xampp\htdocs\xampp\cds.php on line 64
Could not connect to database!
Is MySQL running or did you change the password?"

I have restarted both MySQl and Apache with no effect. the other dbs don't work nor do my previous dbs from XAMPP!!... line 64 in cds.php is:
if(!mysql_connect("localhost","root",""))
I can get past this line by manually entering the root password I changed, but why isn't this file updating? Even if I do manually put in the PW, the file errors out at line 106:
while( $row=mysql_fetch_array($result) )
saying it expects something else but got a boolean (sorry, forgot the exact error). I chased this for hours, searching and can't find a definitive solution.
Please help.
Pete

EDIT: I couldn't find anything in the error logs to assist in trouble-shooting
hoytpr
 
Posts: 4
Joined: 02. June 2011 23:27

Re: Fresh XAMPP, latest Cont. Panel Apache OK, SQL ok CD db

Postby Altrea » 03. June 2011 11:05

hoytpr wrote:I can get past this line by manually entering the root password I changed

Thats the correct way

hoytpr wrote:but why isn't this file updating?

Because that are only example applications and not really needed for the base functionality of the xampp package.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Fresh XAMPP, latest Cont. Panel Apache OK, SQL ok CD db

Postby hoytpr » 03. June 2011 14:11

hoytpr wrote:Because that are only example applications and not really needed for the base functionality of the xampp package.
Thanks, but still why the error at:
while( $row=mysql_fetch_array($result) )

I'd appreciate any help.
hoytpr
 
Posts: 4
Joined: 02. June 2011 23:27

Re: Fresh XAMPP, latest Cont. Panel Apache OK, SQL ok CD db

Postby Altrea » 03. June 2011 16:36

1st: it is much easier to solve problems from someone else if the exact error message is given.
2nd: that must be an aftereffect of something. You have to debug a little but.
expecting $result in this line is false, debug why it is false (nothing in the database to fetch? error in sql syntax?)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Fresh XAMPP, latest Cont. Panel Apache OK, SQL ok CD db

Postby hoytpr » 03. June 2011 18:45

Altrea wrote:1st: it is much easier to solve problems from someone else if the exact error message is given.
2nd: that must be an aftereffect of something. You have to debug a little but.
expecting $result in this line is false, debug why it is false (nothing in the database to fetch? error in sql syntax?)
With apologies, I agree that the exact error message would have been more appropriate. I am not good at MySQL, but was frustrated because I had it working before (probably due to the quality of XAMPP developers rather than my skillset). Altrea, I am poor at debugging. Unfortunately (for me) my trusted and reliable database manager/programmer has taken a leave of absence, and I am but a lowly Biologist, self taught in MySQL, scripting, and linux. I promise to be more informative in future inquires.

For now, after uninstalling (completely, including some manual steps) and reinstalling XAMPP, and again installing Control Panel 3, then adding the proper pw to cds.php. I no longer get the error at line 106. So you are correct. It was an artifact. Hopefully my previous databases can be imported and work.
Pete
hoytpr
 
Posts: 4
Joined: 02. June 2011 23:27


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 158 guests