DeveloperSide.NET Forums
December 09, 2018, 11:40:31 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Howto access to phpMyAdmin from my LAN?  (Read 136604 times)
0 Members and 1 Guest are viewing this topic.
ikerstges
Member
*
Posts: 10


View Profile
« on: January 04, 2005, 10:17:11 AM »

I have setup a server, based on: DeveloperSide.NET Web-Server Suite, for Windows NT/2000/XP 1.14 on a Windows2000 machine with PHP 5.0.3 and phpMyAdmin 2.6.0 installed.

I'm very happy to have access to phpMyAdmin on the server itself (http://localhost/phpMyAdmin).

When I try to access the server from another system in the same LAN (http://192.168.1.2/phpMyAdmin), I get a username/password request and when logging in as root, my browser starts opening the initial page, but it doesn't load.

Is this something I need to fix in Apache's or in phpMyAdmin's configuration? I don't need any restriction to this system, I'd rather like to have it fully open.

Thanks in advance,
Igor.
Logged

ow you got me started! I really get the taste of it!.....
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: January 04, 2005, 04:20:28 PM »

First, we do not know how stable PHP5 is.

Past that...

You need to edit httpd.conf
Change this...
Code:

<Directory "/www/phpMyAdmin">
Options None
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>

to this...
Code:

<Directory "/www/phpMyAdmin">
Options None
AllowOverride None
Order deny,allow
Deny from all
Allow from all
</Directory>

You can also change that to a block of IPs...
Code:

Allow from 192.168.1

And have many 'Allow from' lines.

Restart Apache.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #2 on: January 04, 2005, 04:23:19 PM »

BTW, since you are no longer dealing with 'localhost', you might need to edit phpmyadmin's config.ini.php...
(from the phpMyAdmin Install Guide)
Quote

Edit $cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin/';
the full URL path to phpMyAdmin
note that double logins and browzer errors will occur if user accesses URL 'http://127.0.0.1/phpMyAdmin/'

...and change that 'localhost' to an IP.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: January 04, 2005, 04:30:45 PM »

You might also need to change your MySQL user 'root' host from 'localhost' to '192.168.1'.  If that is the correct syntax for an IP block under mysql.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
ikerstges
Member
*
Posts: 10


View Profile
« Reply #4 on: January 05, 2005, 08:05:29 AM »

Hi,
I've tried these suggestions, but unfortunately they don't bring the desired results.

I've found that I probably need to shift my attention towards the MySQL setup since I found that "telnet 192.168.1.2 3306" gives me the response: "Host 'ClientName' is not allowed to connect to this MySQL server" I've tried to solve this by setting the "host" entry in table "user" of database "mysql" to '%' (as subscribed in GRANT and REVOKE section of the MySQL manual) and restarted the MySQL server but without the desired results.

Any suggestions are still very welcome!?
Logged

ow you got me started! I really get the taste of it!.....
ikerstges
Member
*
Posts: 10


View Profile
« Reply #5 on: January 05, 2005, 11:33:28 AM »

FollowUp:

I've created myself a new useraccount, using the GRANT statements:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'Igor'@'localhost'
    ->     IDENTIFIED BY 'pwd' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'Igor'@'%'
    ->     IDENTIFIED BY 'pwd' WITH GRANT OPTION;


I still get the Username/Password box when I try to connect to phpMyAdmin from a remote client and connection is revoked when I mistype Username or password. When logging in with username: 'Igor' and password 'pwd', the first page loads.

What struck me is following:


It looks as if the page is running everything against 'localhost' although I'm connecting from a remote host!? Also when hoovering the links on this webpage, all URL-info's show 'http://localhost/phpMyAdmin/whatever.php'

Hope to find replies to get this solved....
Logged

ow you got me started! I really get the taste of it!.....
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #6 on: January 05, 2005, 05:46:18 PM »

Quote

mysql> GRANT ALL PRIVILEGES ON *.* TO 'Igor'@'localhost'
-> IDENTIFIED BY 'pwd' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'Igor'@'%'
-> IDENTIFIED BY 'pwd' WITH GRANT OPTION;


You created two accounts.

Does anything not work?
Have you made ALL the changes?  Did you restart everything?
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
ikerstges
Member
*
Posts: 10


View Profile
« Reply #7 on: January 06, 2005, 07:42:19 AM »

Hi,

I have created two accounts indeed, one for use on the local server and the other for user from any other system that can connect to my server.

When opening on the server:  'http://localhost/phpMyAdmin' all works fine.

When opening on a client: 'http://192.168.1.2/phpMyAdmin' all I get is the user/pass authentication and the first page loads (without the png graphics). I cannot open any link from that page because it tries to link me to 'http://localhost/phpMyAdmin/[whatever]' instead of 'http://192.168.1.2/phpMyAdmin/[whatever]'.....
Logged

ow you got me started! I really get the taste of it!.....
ikerstges
Member
*
Posts: 10


View Profile
« Reply #8 on: January 06, 2005, 11:36:24 AM »

GOT THIS SOLVED NOW!

I have changed the file 'config.inc.php':

Original lines:
$cfg['PmaAbsoluteUri'] = 'localhost/phpmyadmin/';
and
$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;

New lines:
$cfg['PmaAbsoluteUri'] = '';
and
$cfg['PmaAbsoluteUri_DisableWarning'] = TRUE;

Happy too!
Logged

ow you got me started! I really get the taste of it!.....
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #9 on: January 06, 2005, 04:31:38 PM »

So you never did change to...
$cfg['PmaAbsoluteUri'] ='http://192.168.1.2/phpMyAdmin';
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
ikerstges
Member
*
Posts: 10


View Profile
« Reply #10 on: January 06, 2005, 09:07:33 PM »

O, YES I DID! But with that change, the page would not load at all!?.... Will give it another try tomorrow.... Thank you for your continuing effort to try and assist.

Cheers!
Logged

ow you got me started! I really get the taste of it!.....
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #11 on: January 06, 2005, 09:58:34 PM »

You should make sure to restart Apache after any changes, but most importantly...

Clear the browser cache each time you make changes to the phpMyAdmin config file.

Code:

$cfg['PmaAbsoluteUri'] ='http://192.168.1.2/phpMyAdmin';


The above should work, given the correct IP.  Perhaps you should try it one more time, except this time...
Close out all the browsers, open one up, and clear out the cache before entering URL...
http://192.168.1.2/phpMyAdmin

As a note, with roaming IPs, you could also change this config line to...
Code:

$cfg['PmaAbsoluteUri'] ='http://$_SERVER[HTTP_HOST]:$_SERVER[SERVER_PORT]/phpMyAdmin';
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!