Link to home
Start Free TrialLog in
Avatar of gian_the_man
gian_the_man

asked on

PHPMyAdmin help - running on http://localhost:81

Hello,

I installed apache, mysql and php on my Windows XP pro box for developmental purposes. I can start Apache and view the page at http://localhost:81. I selected 81 to prevent conflicts in IIS but I may be wrong about that....

Anyway,
http://localhost:81/index.php will pull up all the phpinfo () data and a test_mysql.php page successfully creates a table in mysql.

The problem I'm having seems to be with phpmyadmin only. Though I may be wrong... At the moment,
http://localhost:81/phpmyadmin pulls up the main page, but clicking on any of the links leads to a 404 page cannot be displayed error. I think it has something to do with the ":81"

I read this in the docs:
$cfg['Servers'][$i]['port'] string
The port-number of your $i-th MySQL-server. Default is 3306 (leave blank). If you use "localhost" as the hostname, MySQL ignores this port number and connects with the socket, so if you want to connect to a port different from the default port, use "127.0.0.1" or the real hostname in $cfg['Servers'][$i]['host'].

But I'm not sure if that's something I should modify. Any help appreciated. I will send any information you need.

Here is some additional info from phpinfo ()

_SERVER["SERVER_SIGNATURE"] <address>Apache/2.0.49 (Win32) Server at localhost Port 81</address>  
_SERVER["SERVER_SOFTWARE"] Apache/2.0.49 (Win32)
_SERVER["SERVER_NAME"] localhost
_SERVER["SERVER_ADDR"] 127.0.0.1
_SERVER["SERVER_PORT"] 81
_SERVER["REMOTE_ADDR"] 127.0.0.1
_SERVER["DOCUMENT_ROOT"] C:/web
_SERVER["SERVER_ADMIN"] gian.gonz@xxxx.net
_SERVER["SCRIPT_FILENAME"] C:/php/php.exe
_SERVER["REMOTE_PORT"] 4710
_SERVER["REDIRECT_URL"] /test.php
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /test.php
_SERVER["SCRIPT_NAME"] /php/php.exe
_SERVER["PATH_INFO"] /test.php
_SERVER["PATH_TRANSLATED"] C:\web\test.php
_SERVER["PHP_SELF"] /test.php

Avatar of zombieooo
zombieooo

So what happens when you log into:

http://127.0.0.1:81/phpmyadmin

and click on a link?
ASKER CERTIFIED SOLUTION
Avatar of psadac
psadac
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gian_the_man

ASKER

That worked, psadac. Thanks a bunch...

In regards to the user and password prompt, do I have to specify a domain? I couldn't access with what I tried...

Thanks,

Gian
Gian, it's a mysql user, not an NT User. By default each mysql installation has a user named root with no password, and that's the user you should have used. for security reasons you should change this password.
I changed the 'root' password when setting up mysql. I still can't get in using http authentication with user- root password - xxx
#This File was made using the WinMySQLAdmin 1.4 Tool
#5/3/2004 11:53:00 PM

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=C:/mysql
#bind-address=192.168.5.101
datadir=C:/mysql/data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=root
password=v6gt6y

If I switch to the 'config' auth type, I can get in. I'd like to know why I can't access with http....

Thanks,

Gian
I see what's going on....

There are two places for the auth_type configuration....

$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie

based)?
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = 'xxxxxxx';          // MySQL password (only needed
                                                    // with 'config' auth_type)

And this one....

$cfg['Servers'][$i]['controlpass']     = '';
$cfg['Servers'][$i]['auth_type']       = 'config';
$cfg['Servers'][$i]['user']            = 'root';
$cfg['Servers'][$i]['password']        = '';

I was changing the top one to http.... it was the other one, right? or is it both?
no, you can configure several mysql servers with phpmyadmin, that's why you have many $cfg['Servers'][i][...] and between these servers configurations you have an instruction $i++;
basically, if you choose :

  $cfg['Servers'][$i]['auth_type'] = 'config';

phpmyadmin will use :

$cfg['Servers'][$i]['user']            = 'root';
$cfg['Servers'][$i]['password']        = ''

as mysql user and password to authenticate to mysql. in your situation it will work since you have not changed mysql default password.
however if you choose :

  $cfg['Servers'][$i]['auth_type'] = 'http';

you will be asked a mysql user and password, and the user and password in your config.inc.php will not be used.
i prefer this solution for the following reasons :
- your password is not stored in a config file;
- you can have multiple login accounts
- you can set different privileges for each user
- anybody having access to your web page will not have root privileges on your database.

is it clearer ?
could anyone tell me as a side ques how to make privallages for certain users in phpmyadmin?
thanks