Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Accessing a Password Protected Directory?

Hey guys!

So I'm working on a project with my good friend, mainly coded in PHP. But I have a slight problem. There's a directory which I've made password protected because it's a file which people could use to take advantage of the project and possibly manipulate the project. It's also a vital file, because without it, the site wouldn't work. I can say as much as it's an account dispenser. In a specific part of the coding of index.php, I use this file. But the thing is that it can't access it/read it because it's password protected. Is there a way I can work around this? Maybe a method to make it accessible? Or maybe a method which doesn't require password protected directory, but the users can't use it to take advantage of the project? This might be confusing, but I'll be willing to explain clearly to a PHP expert what the problem is.

Thanks,
Sys

If you have any questions regarding my products, you can contact me through the following:

Discord: FiftyTwo#2945

Make a ".htaccess" file in the directory you want to protect:
And add this line: "Deny From All"

You are done
(Mar 14, 2015 11:56 AM)Helios. Wrote:  Make a ".htaccess" file in the directory you want to protect:
And add this line: "Deny From All"

You are done
But will the PHP code be able to access it/read it still?

If you have any questions regarding my products, you can contact me through the following:

Discord: FiftyTwo#2945

(Mar 14, 2015 11:57 AM)FiftyTwo Wrote:  But will the PHP code be able to access it/read it still?

Yeap. PHP can include/read/write in this directory, whatever you need.
Use FTP to access the .htaccess file and:
Code
Deny from all
Allow from insert_your_ip_here
Done.
You see, Doctor, God didn't kill that little girl. Fate didn't butcher her and destiny didn't feed her to those dogs.
If God saw what any of us did that night he didn't seem to mind. From then on I knew... God doesn't make the world this way.
We do.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by Police 10-13Oct 24, 2012 01:27 PM 19 583 Oct 24, 2012 01:27 PM
Last Post: ManDoR
[PHP] by alphabotOct 23, 2012 11:43 AM 1 179 Oct 23, 2012 11:43 AM
Last Post: Dogs Toy
[PHP] by Stay PluralNov 26, 2011 02:06 PM 2 158 Nov 26, 2011 02:06 PM
Last Post: Stay Plural