Apache Friends Support Forum

It is currently 02. September 2010 15:21

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Problem with phpMYAdmin & mySQL? *STILL NEED HELP*
PostPosted: 30. July 2008 21:42 
Offline

Joined: 30. July 2008 19:52
Posts: 3
Greetings,

I'm brand new to all of this scene, and my ultimate goal is to get oscommerce working with XAMPP. Right now, I cannot get into phpMYAdmin, because the error message says "Cannot load mcrypt extension. Please check your PHP configuration."

I look at phpinfo, and I think it is already enabled.
Just to be sure, here's the link to the php.ini file:
http://www.geocities.com/zacharysweebe/php-ini.txt

UPDATE: I made a sample file to test out mysql. This is the code:
Code:
<?php
$conn = mysql_connect("localhost", "root", "*MYPASSWORD*");
$result = mysql_list_dbs($conn);
while($db_data = mysql_fetch_row($result)) {
echo "<b> $db_data[0]</b><br>";
}
?>

I get this error when running it:
"Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\xampp\htdocs\db.php on line 2"

What is going on???


Last edited by sweebez on 31. July 2008 15:35, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: 30. July 2008 22:36 
Offline
User avatar

Joined: 05. March 2004 23:26
Posts: 1609
Location: Dahoim
Hi,

find this line in your php.ini:

Code:
;extension=php_mcrypt.dll


and remove the Semicolon from the beginning of the line. Then restart your Apache and try it again.

Be sure to edit the correct php.ini File, phpinfo will say you which one you have to use.

glitzi


Top
 Profile  
 
 Post subject:
PostPosted: 30. July 2008 22:45 
Offline

Joined: 30. July 2008 19:52
Posts: 3
Ok, I made the changes you suggested, and when I go to log into phpMYAdmin the "Cannot load mcrypt extension. Please check your PHP configuration." message is gone (Thanks!)
However, I still see this error:
Image
======================
When I run the code I listed before, I get the same error messages:

Code:
"Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\xampp\htdocs\db.php on line 2

Warning: mysql_list_dbs(): supplied argument is not a valid MySQL-Link resource in C:\xampp\htdocs\db.php on line 3

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\db.php on line 4"

======================
When I run XAMPP's Demo CD Collection program now, I get this message:
Code:
"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?"

It's right! I *did* change the password. I was told that I should add some passwords to secure the system.
The changes I made are visible here:
Image
It seems that after making these changes, these problems have arisen.

So any ideas now?


Top
 Profile  
 
 Post subject:
PostPosted: 02. August 2008 02:04 
Offline

Joined: 30. July 2008 19:52
Posts: 3
*bump*


Top
 Profile  
 
 Post subject:
PostPosted: 03. November 2008 23:57 
Offline

Joined: 19. September 2008 19:59
Posts: 3
same problem. this occurs when I switched the PHP to 4. Mcrypt shows up in phpinfo, but phpmyadmin returns: "Cannot log in to the MySQL server" when trying to login.


Top
 Profile  
 
 Post subject:
PostPosted: 04. November 2008 00:58 
Offline
User avatar

Joined: 03. October 2008 05:10
Posts: 764
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
genu wrote:
same problem. this occurs when I switched the PHP to 4. Mcrypt shows up in phpinfo, but phpmyadmin returns: "Cannot log in to the MySQL server" when trying to login.

I have just successfully swapped from php5 to php4 and back again using the .\xampp\php-switch.bat file without any issues at all including logging into phpMyAdmin on each swap, with and without a password and with mcrypt uncommented in my original .\xampp\apache\bin\php.ini file.

Make sure that all the XAMPP components are stopped including if you have them running as services.

I use the cookie method of authentication for phpMyAdmin in the .\xampp\phpMyAdmin\config.inc.php file - this seems to be the most stable for me.
Code:
$cfg['Servers'][$i]['auth_type']     = 'cookie';      // Authentication method (config, http or cookie based)

Try using different methods by changing it (cookie and http work for me but not config), save the file then restart apache.

Let us know how you get on and maybe post any error messages that you may come across.

My test to see if your post was anything version related seems to be negative - I am currently using XAMPP 1.6.8 but I have not had any issues with switching even in the many previous versions I have used where switching was a feature of XAMPP.

http://www.apachefriends.org/en/xampp-windows.html#1171
http://www.apachefriends.org/en/xampp-windows.html#1172


Top
 Profile  
 
 Post subject:
PostPosted: 11. November 2008 14:19 
Offline

Joined: 11. November 2008 13:52
Posts: 1
I've just set up XAMPP 1.6.8 and I've had the same problem.
It appears to be caused by the MySQL password format changing. It would appear that the MySQL client library supplied with the php 4 configuration do not support the newer (post MySQL 4.1) passwords.
If, as I did, you created a root passwords using PHP 5 and XAMPP 1.6.8 you will not be able to login using PHP 4 to MySQL.

To fix this, switch back to PHP 5. Login to phpMyAdmin and for each user you've created a password for (including root) do the following:

Edit the user and change the password (can be the same password) using the "Password Hashing: MySQL 4.0 compatible" option instead of the "MySQL 4.1+" option.

You will find the password option in:
"privilidges section" and then edit each user using the icon at the end of each users details. The "change password" for that user is then listed with other options that can be changed.

Once you've done this you should be able to switch back to PHP 4 and then login correctly to phpMyAdmin (and the databases using your php scripts).

It worked for me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group