Page 1 of 1

log into phpmyadmin from pc not server

PostPosted: 08. June 2018 13:48
by MarkK
I'd like to log into the phpmyadmin database from my desk pc, not the server where the database is located. I get the following error:

New XAMPP security concept:

Access to the requested directory is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

Here is the block I believe I need to modify in the httpd-xammp.conf file:

Alias /phpmyadmin "E:/Engineering/Database/phpMyAdmin/"
<Directory "E:/Engineering/Database/phpMyAdmin">
AllowOverride AuthConfig
Require local
Require ip 192.168.0.22
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

If someone could kindly tell me what to change, assuming I found the block I need to change, that would be greatly appreciated.

Will I need to stop and restart the Apache service in order for the changes to take effect?

Thanks

Mark

Re: log into phpmyadmin from pc not server

PostPosted: 08. June 2018 13:54
by TonyVier
Remove "require local"..

Re: log into phpmyadmin from pc not server

PostPosted: 08. June 2018 14:01
by Nobbie
TonyVier wrote:Remove "require local"..


.. and also remove "Require ip 192.168.0.22" (whoever did that, thats not default configuration).

Will I need to stop and restart the Apache service in order for the changes to take effect?


Yes.

Re: log into phpmyadmin from pc not server

PostPosted: 21. June 2018 14:07
by MarkK
I will give this a try.

Thanks

Mark

Re: log into phpmyadmin from pc not server

PostPosted: 21. June 2018 20:13
by gsmith
Nobbie wrote:
TonyVier wrote:Remove "require local"..

.. and also remove "Require ip 192.168.0.22" (whoever did that, thats not default configuration).


Just curious, did you read the question? He does not want the "default" config.

If he removes require local, only 192.168.0.22 can access phpmyadmin (what he wants). If he also removes that require ip as you suggest, nothing can access it. Same as require all denied.

Re: log into phpmyadmin from pc not server

PostPosted: 22. June 2018 11:20
by Nobbie
gsmith wrote:Just curious, did you read the question?


Of course, and he asked this question:

Here is the block I believe I need to modify in the httpd-xammp.conf file:


If he suspects that he has to adjust this block, then I assume of course that he neither knows what he is doing nor that he has already done anything.

gsmith wrote:If he removes require local, only 192.168.0.22 can access phpmyadmin (what he wants).


How do you know anything about that IP? And what if the Desktop PC is assigned a dynamic IP via DHCP, what is very common in LANs? Especially when he is still unsure if this is the right block to customize? That's why I was so surprised how this line got there? Why doesn't he add that?

ALso if so, then you should either ask if this IP is the right IP and it is static, or recommend the correct Require clause for that LAN, namely "Require 192.168.0".

Either way, I cannot see how this line got there and we have not received an answer to date. But you can save yourself the stupid question of whether I would have read the question.

Re: log into phpmyadmin from pc not server

PostPosted: 25. June 2018 19:26
by MarkK
OK, after reading all the replies, I believe I can leave 'require local' as is, and change the ip to '192.168.0' , and this will allow any pc on the lan to access the database, which is what I want. 192.168.0.22 is the static ip of the server, pc's on the lan get a new ip each day. I want to be able to access/view the phpmyadmin page from any pc on the lan (it is behind a password).

I have not tried this yet.

Re: log into phpmyadmin from pc not server

PostPosted: 25. June 2018 20:50
by Nobbie
MarkK wrote:192.168.0.22 is the static ip of the server


@gsmith: oops, how embarrassing....

Re: log into phpmyadmin from pc not server

PostPosted: 26. June 2018 13:26
by MarkK
Got her done, thanks.

Mark

Re: log into phpmyadmin from pc not server

PostPosted: 02. July 2018 18:45
by gsmith
Not really, I just assumed (incorrectly yes) he had given the right IP for the computer he wanted to access it. It sounded as if he wanted access from just the one, not the entire lan or the server itself.

I'd like to log into the phpmyadmin database from my desk pc, not the server where the database is located.

Re: log into phpmyadmin from pc not server

PostPosted: 02. July 2018 19:54
by Nobbie
gsmith wrote:Not really, I just assumed (incorrectly yes) he had given the right IP for the computer he wanted to access it. It sounded as if he wanted access from just the one, not the entire lan or the server itself.


Even if he wants to access from just "the one", just "the one" would not have a static IP:

pc's on the lan get a new ip each day


That already requires to apply a range instead of a single IP. As already said.