NYCPHP Meetup

NYPHP.org

[nycphp-talk] accessing phpmyadmin as different users

Josh McCormack joshmccormack at travelersdiary.com
Fri Oct 17 17:24:59 EDT 2003


I'd continue with your thought of hardcoding the username and password. 
Hard code everything to verify that you're putting in the right 
variables, etc. Use print statements and error logs to see exactly what 
you're passing.

Josh

Nestor Florez wrote:

> I tried it with $_GET and $_POST and with either of them I am able to print the information in the 
> variables.
> 
> But it fails
> 
> Nestor :-)
> 
> -----Original Message-----
> From: Analysis & Solutions <danielc at analysisandsolutions.com>
> Sent: Oct 17, 2003 9:38 AM
> To: NYPHP Talk <talk at lists.nyphp.org>
> Subject: Re: [nycphp-talk] accessing phpmyadmin as different users
> 
> Hi Nestor:
> 
> On Fri, Oct 17, 2003 at 09:11:21AM -0700, Nestor Florez wrote:
> 
>>$cfg['Servers'][$i]['user'] = $_GET['userid'];
>>$cfg['Servers'][$i]['password'] = $_GET['pwd'];
>>
>>But when I try this I get an error:
>>Access denied for user: 'ODBC at localhost' (Using password: NO)
> 
> 
> So, it sounds like the information you suppliied in $_GET isn't getting 
> there.
> 
> 
> 
>>If I change the code to :
>>$cfg['Servers'][$i]['user'] = 'view';
>>$cfg['Servers'][$i]['password'] = 'view';
> 
> 
> So, to confirm my theory you can put "view" and "view" into the form you 
> created.  Bet you'll get the same error message.
> 
> Do you really mean $_POST?
> 
> Regardless, you need to alter your code to obtain the user input from the 
> right place and naturally.
> 
> Enjoy,
> 
> --Dan
> 




More information about the talk mailing list