phpmyadmin mysql.dd mysqli.dll login issues

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

phpmyadmin mysql.dd mysqli.dll login issues

Postby w4vy » 06. January 2009 04:25

Hi I have ran into some trouble with PHPMyAdmin and I have looked and searched but am a bit stuck.

Basically if I use the php_mysqli or php_mysqli_5.0.51a than the normal php_mysql dll then this is what happens :-

mysql = logs in via Admin@localhost with no privileges

mysqli = logs in via root@localhost with privileges but says Cannot load mysql extension. Please check your PHP configuration. - Documentation

mysqli_5.0.51a = apache crashes

Can someone explain to me why it logs in via admin and not root when I do log in with the username root when I use the mysql.dll ?

Thankyou.
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby Sharley » 06. January 2009 05:04

What version of XAMPP?

What is this set to in your xampp\phpMyAdmin\config-inc.php file?
Code: Select all
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
If you make any changes always save and restart Apache and MySQL.

Not sure about Safe Mode but try it again in both modes as there are some possible issues when in Safe Mode.

I am also not sure about your issue as without more precise detail of what you are doing and how you are doing it I can't really replicate the problem.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby w4vy » 12. January 2009 18:58

Hi thanks for your reply Sharley and sorry I have took so long to reply back but I have been busy m8.

However having read your reply I had a look at my PHPMyAdmin config file and it doesn't have that line in it ?
This is what I have :-

Code: Select all
<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'My Blowfish Key here'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type']     = 'cookie';      // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = false;

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

/*
 * End of servers configuration
 */

?>


Should I have that line you mentioned ? and also do I have to put in my password @ $cfg['Servers'][$i]['password'] = '?'; ? or do I leave it blank ? And one last thing Sharley do you have any hints and tricks for this config file to maybe make things more secure or faster/steamlined plz ?

Thanks in advance

w4vy

P.S it is xampp 1.7.0 the new one
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby Izzy » 13. January 2009 00:50

W4vy, sorry Sharley is on extended vacation so you are stuck with me for a while. :)

2 possible ways to solve this.

1. Go to xampp\phpMyAdmin\libraries\config.default.php
Read the warning - Do not edit this file.

Find the lines
Code: Select all
/**
 * The PHP MySQL extension to use ('mysql' or 'mysqli')
 *
 * @global string $cfg['Servers'][$i]['extension']
 */
$cfg['Servers'][$i]['extension'] = 'mysql';
Copy this line:
$cfg['Servers'][$i]['extension'] = 'mysql';
to your xampp\phpMyAdmin\config-inc.php file and paste at the end of this section:
/* User for advanced features */
Now edit the line as required.
Save and restart MySQL and Apache just for good measure.


2. This is so you don't need to keep following the above every time you need to make configuration changes to items not in the config-inc.php file - the order that phpMyAdmin locates configs is first in the config-default.php if not in there or the file is missing (renamed) then it looks in the config-inc.php file.

So if you rename the existing config-inc.php to say config-inc.php.orig and copy the whole of the config-defaults.php file over to the phpMyAdmin root folder and then rename it to config-inc.php then you can edit this file with any edits from the original config-inc.php.orig file that have been made - and you can now delete the warning lines if you prefer to help distinguish the 2 files.

Now go back to the config-defaults.php file and rename that file to, you guessed it, config-default.php.orig

Restart MySQL and see how that goes.


You should leave the password line blank as it is taken care of by XAMPP, that is if you set one in XAMPP, which in turn is managed by MySQL.


Your last question I can't answer generally only if you have specific issues that can be addressed by a specific config line - and if the need arises that an edit is required then, more than likely, you may be able to find and edit the particular line yourself, if not we are here on the forums for that purpose and will be only too willing to help.

Good luck.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby w4vy » 13. January 2009 06:36

Thanks Izzy for helping me out with this, I didn't know about the config file in the library folder. I have done all that you said and everything is fine apart from the xampp security page now tells me that The MySQL admin user root has NO password and that Every local user on Windows box can access your MySQL database with administrator rights. You should set a password.

I have gone back into the security page to set another password and have restarted everything but it still says No password. Do you know what could have happened ?
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby Izzy » 13. January 2009 06:46

Go to xampp\mysql and try the resetroot.bat file and try again to set the password in the security page but make sure MySQL is stopped first or if it fails start MySQL again and run the bat file again.

You have cookies set so also delete the old cookie from your browser which may help also.

There is also some relevance in the readme_en.txt file under the MySQL section.

The alternative is fairly complex.
Last edited by Izzy on 13. January 2009 06:55, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby w4vy » 13. January 2009 06:55

:( it's not working

what's the complex method ?

*sigh* lol
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby Izzy » 13. January 2009 07:07

w4vy wrote:The MySQL admin user root has NO password and that Every local user on Windows box can access your MySQL database with administrator rights. You should set a password.

Make sure either cookie or httpd is the authentication method set in the config-inc.php before attempting this procedure - cookie would normally be the default setting.

If you can login into PMA as root with a blank password then this may help.

In the Privileges menu item, root both for localhost and 127.0.0.1 should say No under the password column and Yes if a password is set or after you set one by the following process.

Under the Privileges menu, find root for localhost and click on the pencil edit icon at the end of the row.

You can add a password under the Change Password section, or even change a password previously set.

Click on Go in the Change Password section to have any changes you make recognised.

Close PMA.

Now try again to login to http://localhost/phpmyadmin with user root and your new password.

Repeat the process for root for 127.0.0.1

BTW you can also delete a password by selecting No Password in the Change Password section.

Please let us know if this worked for you.
Thanks.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby w4vy » 14. January 2009 21:48

Ok I think we are getting somewhere :)

So far this is the scenario :-

Using the Mysqli extension I was able to log into PMA with the user root and NO password but only if I set the AllowNoRootPassword in PMA's Config file to True. I then followed your instructions to set up a password for root@localhost after lots and lots of attempts at setting a password via the xampp security page which all ended in failure. I then switched AllowNoRootPassword back from True to False and Restarted everything and tried to log in again to PMA, first without a pw (just to test) which it then did the right thing and said Access Denied. I then tried to access with the pw I set for root@localhost and access was granted :)

However, If I use the Default Mysql extension and try to log in to PMA it logs me in as user SYSTEM@localhost with No Privileges. Why is it doing that ? it's not like I type in System as my user name.

I suppose the Mysql extension logging me in as System@localhost isn't that bad for me as I would be using the Mysqli ext' instead so unless I am missing some important factor regarding that or maybe you/I have to have both ext' uncommented in php.ini file then I can move on from it and try to fix the remaining problem/s/? which is :-

I have a password set now for the user root@localhost as stated above and it works fine but still the Security page in xampp tells me that there is still no password set and that I should fix it asap. Now I know you said to set up a password for the user 127.0.0.1@localhost too but do I really need to do that since 127.0.0.1 is and can only be this machine ? Would adding a password stop say certain programmes from accessing a database, I'm just thinking about when I had my forum running before xmas and the arcade script couldn't connect and was trying to log in as user Admin@localhost using password NO and I couldn't figure out what was happening because the arcade script called another script that had the user details and password details already set for the forum which was root@localhost, which is kinda like what is happening now but this time the user is System@localhost.

last but not least, IS the reason the xampp page still says unsecure because there is no password set for the user 127.0.0.1@localhost or is there still something else not working right ?

Sorry for the long post and the delay in replying, and thank you for helping me with this matter.
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby Izzy » 15. January 2009 04:21

w4vy wrote:...only if I set the AllowNoRootPassword in PMA's Config file to True.
This is the default setting and would, in normal circumstances, not need changing if you set passwords for your users including superuser root.

w4vy wrote:...after lots and lots of attempts at setting a password via the xampp security page which all ended in failure.
Did you change the settings in the httpd-xampp.conf file as suggested in this post by Wiedmann which may or may not be related but should be changed anyway perhaps in 1.7.0 and especially on Vista as it includes the IPv6 localhost entry in the Windows HOSTS file ::1 localhost - try commenting that out to # ::1 localhost:
viewtopic.php?f=16&t=32503&p=131519

w4vy wrote:I then switched AllowNoRootPassword back from True to False and Restarted everything and tried to log in again to PMA, first without a pw (just to test) which it then did the right thing and said Access Denied. I then tried to access with the pw I set for root@localhost and access was granted
This behavior will occur regardless of the AllowNoRootPassword setting if a password has been set and I tested that on my XP box.

w4vy wrote:However, If I use the Default Mysql extension and try to log in to PMA it logs me in as user SYSTEM@localhost with No Privileges. Why is it doing that ? it's not like I type in System as my user name.
Again I could not replicate this behavior on my XP box on a vanilla 1.7.0 installation from a 7zip version install - which leads me to the conclusion it's either another Vista 64 issue, as MySQL would seem to have issues with 64 bit systems on Vista, or it is the install method used ie installer version versus the 7zip version or you have or have had another instance of MySQL that either is still installed or has left some residue behind affecting your current XAMPP MySQL instance.

Try to clean uninstall then do a fresh new install of XAMPP using a different install method, the 7zip version perhaps and install to the default C:\ drive which will create C:\ when the files are extracted, then simply run the setup_xampp.bat file - also see if there is any issues with old installs especially IIS in Vista.

You know to clear your cookies for localhost and the browser cache from time to time?

w4vy wrote:I suppose the Mysql extension logging me in as System@localhost isn't that bad for me as I would be using the Mysqli ext' instead so unless I am missing some important factor regarding that or maybe you/I have to have both ext' uncommented in php.ini file then I can move on
This system@localhost issue has to be resolved or it may have other consequences later down the track and it would be best to address it at this early stage than later when you may have a more complex structure in place.

w4vy wrote:I have a password set now for the user root@localhost as stated above and it works fine but still the Security page in xampp tells me that there is still no password set and that I should fix it asap.
See the last comment below.

w4vy wrote:Now I know you said to set up a password for the user 127.0.0.1@localhost too but do I really need to do that since 127.0.0.1 is and can only be this machine ?
This is also the case with localhost as it's IP is 127.0.0.1 the local loop back address, both are only accessible from the PC your are currently logged into - BTW I deleted this root@127.0.0.1 entry in 1.6.8 with no ill effects at all and may be worth a try as you can always create it again if removing it gives issues.

w4vy wrote:Would adding a password stop say certain programmes from accessing a database, I'm just thinking about when I had my forum running before xmas and the arcade script couldn't connect and was trying to log in as user Admin@localhost using password NO and I couldn't figure out what was happening because the arcade script called another script that had the user details and password details already set for the forum which was root@localhost, which is kinda like what is happening now but this time the user is System@localhost.
Another example of never setting the root user for a database in a script as this superuser root has full privileges and could spell disaster, always create a specific user for a specific database then the only 2 users allowed to manage that database are the specific user when logged in to PMA/MySQLl and the superuser root.

w4vy wrote:last but not least, IS the reason the xampp page still says unsecure because there is no password set for the user 127.0.0.1@localhost or is there still something else not working right ?
The XAMPP pages can be secured in the Security menu item of the Welcome Page and the files created would be in the xampp\security and the xampp\security\htdocs folders and also in the xampp\htdocs\xampp - .htaccess and .htpasswd files.

I hope all this helps and good luck again.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby Izzy » 16. January 2009 03:26

Izzy wrote:Go to xampp xampp\mysql and try the resetroot.bat file...
w4vy wrote::( it's not working

what's the complex method ?

*sigh* lol

There is now a patch available for this resetroot.bat issue perhaps:
http://sourceforge.net/project/showfiles.php?group_id=61776&package_id=89552

File is xampp-patch2-win32-1.7.0 put together by the XAMPP For Windows developer Kay Vogelgesang - kvo forum handle

From the readme file:
Refresh:
\php\ext\eAccelerator.dll
\php\ext\eLoader.dll
Rebuilds:
\php\ext\php_xdebug.dll
Bugfixes:
\mysql\resetroot.bat


Fixes the above but I have not tested it, also it replaces some php extension dlls with the one's in the patch for fixing other issues that have come to light in 1.7.0 - includes both patch 1 and patch 2 fixes.

In response to posts in this topic which you may have to translate:
viewtopic.php?f=12&t=32511

Watch out for more patches perhaps as this is the second patch now. :)
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby w4vy » 17. January 2009 19:00

Hi, thanks for all the help so far but I had already patched everything and still had the problem's. As for you saying to maybe start again with a fresh install , well it already was a fresh install and there had never been a mysql install or anything else on the computer. I think though that I will try again and start again from scratch one last time and then if I cant sort it out then I'll wait for the next xampp and go back to 1.6.8.
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby w4vy » 20. January 2009 19:46

Good News Izzy, after doing a re-install and patching with patch2 I have as far as I can tell a 100% working xampp 1.7.0 p2 :)

I started by un-installing everything and formatting the partition xampp sat on, and then deleting all the registry keys that needed deleting, rebooted the pc and then went from there installing xampp and patch 2. I then tested the installation but more importantly tested phpmyadmin and the xampp security page's and so far great. The real test though was changing from Mysql.dll to Mysqli.dll in the pma config file and hoping it didn't start having a personality disorder again, which it didn't so super great.

Now I have the server set up with Active Perl and ImageMajick, Ioncube loaders and Mod Security 2 like before I tried upgrading from 1.6.8 to 1.7.0 and I am happy again. ;) So I'd just like to thank you Izzy for your help and even though it ended up just being a fresh install to fix the problems I have learned things I didn't know in the process of the trial and error we went through to get to the re-install so cheers m8.

Now does anyone know anything about .htaccess files ? lol
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Re: phpmyadmin mysql.dd mysqli.dll login issues

Postby Izzy » 20. January 2009 23:21

Quite often it has been an uninstall then a fresh install that has solved those seemingly unsolvable and very strange issues in XAMPP - but reformatting etc. is going to the extreme and often would be impossible for some who have too much to lose by a reformat, although, I suppose, it would be fine on a new unused PC perhaps.

On Vista admin etc. here are a couple of links worth a read:
http://www.winvistaclub.com/t12.html
Open an elevated command prompt

w4vy wrote:...Now does anyone know anything about .htaccess files ?
Anything specific you want to know?

Some reading here:
http://httpd.apache.org/docs/2.2/howto/htaccess.html

http://www.askapache.com/htaccess/apache-htaccess.html

This site has some interesting reading on lots of relevant server issues:
http://www.javascriptkit.com/howto/htaccess3.shtml

...and of course a Google for .htaccess will bring up some useful results.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 100 guests