2

I have made PHP Application & I am going to install XAMPP on client's Windows machine in order to run the application. Everything is working as expected but I need a Login Screen (my own mysql database or builtin mysql functionality) when someone go to localhost/phpmyadmin . I don't want that client access the Db.

Secondly is there a nice & simple way to hide/encrypt (something like exe) my php code so that my client does not open my php files etc.

Thanks

Yaseen
  • 21
  • 3
  • I would assume that `phpmyadmin` always requires a login, but perhaps that is not the case if the database user has no password (never encountered that situation...). Does the database user have a password and if it does, is it hard-coded in the phpmyadmin settings? – jeroen Apr 25 '14 at 22:54
  • I have not created the user for my database, just database and username and password for that database. so I need to create user for that database? – Yaseen Apr 25 '14 at 22:58
  • @jeroen Yeah XAMPP by default doesn't require a login for phpmyadmin, believe it uses 'root' with null password – Chris Brown Apr 25 '14 at 22:59
  • @jeroen Please let me know more please – Yaseen Apr 25 '14 at 22:59
  • 1
    @Yaseen http://stackoverflow.com/questions/17759776/how-to-get-login-option-for-phpmyadmin-in-xampp – Chris Brown Apr 25 '14 at 23:00
  • @Yaseen no problem, it might be worth referring to [this](http://robsnotebook.com/xampp-builtin-security) too regarding securing XAMPP further, if you require it – Chris Brown Apr 25 '14 at 23:06

1 Answers1

0

for encryption use ioncube php encoder

for disable phpmyadmin login page go to folder\apache\conf\extra\httpd-xampp.conf

Somewhere down in the bottom of this configuration file is the LocationMatch node

Even though you would think the default Order is set to deny, allow with Deny from all. This configuration by default is set to Allow from 192.168.0.#. Remove this ip range and you are set. and change this

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

to this

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Anri
  • 1,706
  • 2
  • 17
  • 36