Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
htaccess htpasswd not working on php files?
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- htaccess htpasswd not working on php files?
htaccess htpasswd not working on php files?
03-08-2007 2:47 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi,
I've followed the tutorial on: http://usertools.plus.net/tutorials/id/5 for setting up password protection on folders, but it doesn't seem to work when you request an actual php file.
i.e. request a php file from a protected directory and the user/pwd prompt appears. Click cancel on the prompt and the requested php file is executed and displayed. However if it is a plain txt or config.ini type file then the protection works as expected.
Is there something im missing here.. is there something that needs configuration by plusnet?
Really need some advice on this one... have spent all day on it so far!
thanks.
I've followed the tutorial on: http://usertools.plus.net/tutorials/id/5 for setting up password protection on folders, but it doesn't seem to work when you request an actual php file.
i.e. request a php file from a protected directory and the user/pwd prompt appears. Click cancel on the prompt and the requested php file is executed and displayed. However if it is a plain txt or config.ini type file then the protection works as expected.
Is there something im missing here.. is there something that needs configuration by plusnet?
Really need some advice on this one... have spent all day on it so far!
thanks.
Message 1 of 4
(9,402 Views)
3 REPLIES 3
Re: htaccess htpasswd not working on php files?
03-08-2007 2:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You are correct, you cannot protect .php files with .htaccess/.htpasswd.
This is because the ccgi server runs the php interpreter in cgi mode and not as an apache module so the php file is read before apache reads the .htaccess file.
There is no way around it.
This is because the ccgi server runs the php interpreter in cgi mode and not as an apache module so the php file is read before apache reads the .htaccess file.
There is no way around it.
Message 2 of 4
(1,580 Views)
Re: htaccess htpasswd not working on php files?
03-08-2007 2:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for the confirmation mate
i can stop wasting my time now!!
i can stop wasting my time now!!
Message 3 of 4
(1,580 Views)
Re: htaccess htpasswd not working on php files?
03-08-2007 3:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
When we come to redesigning CGI in the not *too* distant future, it is likely that we will revisit this.
Message 4 of 4
(1,580 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- htaccess htpasswd not working on php files?