NYCPHP Meetup

NYPHP.org

[nycphp-talk] accessing phpmyadmin as different users

Hans Zaunere hans at nyphp.org
Fri Oct 17 15:17:00 EDT 2003



Nestor Florez wrote:

> I way pass these steps you mentioned.
> 
> I can handle the debugging, because it is the same way I do it 
> everytime I program in PHP or Perl.
> 
> PHPmyAdmin does not have a loging page as of version 2.3.3.

Ahh, I blurred out what version you were dealing with :)

Just as an FYI, though, you should take care using older versions, especially with newer versions of MySQL.  I've seen old versions of phpmyadmin do fun things, even with old versions of MySQL.
  
> Basically you add the user and pwd into the config.inc.php file
> in a hash array:
> -------------
> $cfg['Servers'][$i]['user']             = 'user';      // MySQL user
> $cfg['Servers'][$i]['password']      = 'pwd'; // MySQL password
> ---------------
> 
> BUT WHEN I put in variables in the hash array it fails:
> $cfg['Servers'][$i]['user']             = $user;      // MySQL user
> $cfg['Servers'][$i]['password']      = $pwd; // MySQL password
> 
> YES, the variable do have the information that I want to pass.

You're probably having name collisions, or worse, register_global problems.  Try using variable names that aren't so common.

$cfg['Servers'][$i]['user']          = $yankees_user;     // MySQL user
$cfg['Servers'][$i]['password']      = $yankees_pwd;      // MySQL password


Of course those names might cause problems too :)

H





More information about the talk mailing list