Tuesday, August 20, 2013

New XAMPP security concept [solved]

Hello Everyone,

I have just downloaded the new XAMPP 1.8.0. and got the error at localhost/phpmyadmin

New XAMPP security concept:

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

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

If you think this is a server error, please contact the webmaster.

Error 403

localhost


So the solution for this is as follows:

1) Open httpd-xampp.conf which is at /opt/lampp/etc/extra/

2) Find <Directory "/opt/lampp/phpmyadmin">

3) Now just add Require all granted before </Directory>

4) So the code will look like this
    <Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
    Require all granted
   </Directory>

5) Now finally Restart the xampp with this command /opt/lampp/lampp restart

That's it and you are Done!

Found it helpful ? Comment's please :)


Thanks for reading.
Enjoy & Be Open
Amit Naik

48 comments:

  1. At last! I've been battling this error for weeks and tried every solution I could find, but none worked. I knew the solution had to be very simple. Thank you!

    ReplyDelete
  2. Thanks! I couldnt find this answer on the official forum. You helped me out big time.
    "Access to the requested object is only available from the local network." while im connecting to localhost/phpmyadmin

    Well. Solved. Thanks!

    ReplyDelete
  3. Thank you so much, I've been struggling with this for the past 2 weeks.

    ReplyDelete
  4. Just nice man.
    Thanks for the help.
    Have a nice XMas

    ReplyDelete
  5. wow! that was really helpful, thank you so much for this

    ReplyDelete
  6. cant access xampp server site from any other outside network computer...only can c welcome page from localhost....and if i enter my public address in the same laptop where xampp is installed, it works....but when others type my public ip address, its not working n says "could not connect to remote server" ...windows 7...xampp version 1.81 ... firewall is also off and i use internet via my phone's tethering hotspot...please help ...

    ReplyDelete
    Replies
    1. Hmm So you want the whole world to see your xampp right ? If so then please follow this ( this is for windows 7 folks)
      1) go to C:\xampp\apache\conf\extra\
      2) open httpd-xampp.conf file in wordpad or any editor.
      3) search for Order deny,allow
      Please ignore the first Order deny,allow. Look at the second Order deny,allow
      4) Now on next line of Order deny,allow put the # just before Deny from all so the code will look like this\

      Order deny,allow
      # Deny from all

      5) Finally restart the XAMPP & check if it is accessible.

      NOTE: This is not a secure way to open your XAMPP port world wide. You must have a password set for phpmyadmin . When not in use stop the APACHE etc.

      Delete
  7. Worked for me ....Thanks a lot buddy...:D

    ReplyDelete
  8. Worked for me.Very usifullllllll

    ReplyDelete
  9. hi
    i tried your suggestions but now it is showing

    Fatal error: Call to undefined function __() in /opt/lampp/phpmyadmin/libraries/Config.class.php on line 755

    please help

    ReplyDelete
    Replies
    1. I got that error too.. What i did was this.. Opened the Config.class.php file -> commented(//) the 755th line(//die(__('Wrong permissions on configuration file, should not be world writable!'));
      )...
      I am not a professional.. but it worked for me... and i dont know what are the demerits of it... :)

      Delete
  10. I also tried the suggestions but now it is showing:

    Fatal error: Call to undefined function __() in /opt/lampp/phpmyadmin/libraries/Config.class.php on line 755

    ReplyDelete
    Replies
    1. I got that error too.. What i did was this.. Opened the Config.class.php file -> commented(//) the 755th line(//die(__('Wrong permissions on configuration file, should not be world writable!'));
      )...
      I am not a professional.. but it worked for me... and i dont know what are the demerits of it... :)

      Delete
  11. Thank you Amit Naik , i got it

    ReplyDelete
  12. how do I edit httpd-xampp-conf. file! i can't re-edit and all! it says, you have not enough permissions to perform the operations

    ReplyDelete
    Replies
    1. ok so do as following..
      1) open your terminal
      2) cd to that respective directory
      3) type this command sudo gedit httpd-xampp.conf
      if it is asking for password then use root password

      OR

      1) open terminal
      2) enter this command sudo nautilus
      3) now browse to this directory/file and you can write anything to that file.

      Delete
  13. Excellent instruction. Sails filled with knowledge not blown up with psychotical self-manifestation. Thanks a lot

    ReplyDelete
  14. thanks so much...this really helped

    ReplyDelete
  15. i am also getting the same problem but in my httpd-xampp-conf file, i do not find order allow,deny and "deny from all" line. instead it is written as require local..i tried changing it to require all granted, also added "order allow,deny and then #Deny from all,......but still it is not working..i have xampp 1.8.3-3

    ReplyDelete
  16. the solution did not work for me until i tried the marked correction on this link http://stackoverflow.com/questions/1045845/how-to-call-a-javascript-function-from-php

    ReplyDelete
  17. Replies
    1. It worked now, I just made it default and worked, I pasted xampp access last time.

      Delete
    2. what does it mean "you made it default" i am getting the same error and applied the above solution as well but it didn't work for me . i am trying to access a php file from an android app.

      Delete
  18. Open httpd-xampp.conf which is at /opt/lampp/etc/extra/
    no, it's at \xampp\apache\conf\extra
    and there is no such place in the file.

    ReplyDelete
  19. Hello Amit,

    i am getting the same error when i try to access a php file from my android app. i updated the httpd-xampp.conf file as suggest in the blog but it didn't help. even after restarting the xampp i am getting the same error. my xampp version is 1.8.3-5 . is there any other solution of this error in this version ?

    ReplyDelete
  20. I couldn't solve it.running lamp on digitalocean droplet ubuntu 14.0

    ReplyDelete
  21. Can you please confirm what is the solution, if I want to add host name of my 2nd computer as ip address used to change with every connectivity.

    ReplyDelete
  22. Thanks, This has worked for me perfect!

    ReplyDelete