On Tue, Sep 7, 2010 at 10:38 PM, Arak Tai'Roth <[email protected]> wrote:
> Can anyone help me with this problem please?
>
> On Sep 6, 11:37 pm, "Arak Tai'Roth" <[email protected]> wrote:
>> So, I am aware this question has been asked and answered in a variety
>> of different ways in a variety of different places. I have already
>> spent way too much time trying to find a solution, so I'm hoping to
>> find a solution here by just asking myself.
>>
>> I am using CakePHP 1.2.5 in this case if that makes a difference. I'm
>> hoping not, because I'm hoping to use whatever solution I get on a few
>> different installations, all of which use different versions.
>>
>> Anyways, the issue is this. I have setup a directory inside /homePath/
>> app/webroot/, the directory is called admin, so the full path looks
>> like /homePath/app/webroot/admin. Now getting to this directory works
>> great. Until I password protect it using a .htaccess and .htpasswd
>> file.
>>
>> After I implement the password protection, I get this error, "Error:
>> The requested address '/failed_auth.html' was not found on this
>> server."
>>
>> My .htaccess file looks like this:
>> AuthType Basic
>> AuthUserFile /homePath/app/webroot/admin/.htpasswd
>> AuthName "Precision Laser Therapy Administrators"
>> require valid-user
>>
>> I am using Dreamhost and have generated this using their panel, so I
>> am pretty positive the /homePath/ portion is correct.
>>
>> I have already tried the solutions 
>> onhttp://groups.google.ca/group/cake-php/browse_thread/thread/9054f372d...,
>> andhttp://groups.google.ca/group/cake-php/browse_thread/thread/30ea77cad...
>>
>> I couldn't get them to work, that could be because I'm dumb and missed
>> something that they didn't explicitly say or they just simply won't
>> work in my case. Does someone have a solution for this issue? Assume
>> that the only thing I have changed to a static Cake install, is the
>> addition of the admin directory in /app/webroot, and the addition of
>> the .htaccess and .htpasswd files inside of it. Any help is extremely
>> appreciated.


What is this directory to be for? I ask because I'm pretty sure that
naming it "admin" will cause you trouble, unless you've changed
Routing.admin in core.php. Are you also taking advantage of admin
routing and actions?

Anyway, if you simply want a protected dir to upload files to, add a
directory in app (same level as webroot), set the permissions to be
writable by the web server, and save them there. When it comes time to
display the files, use MediaView. If this is what you're after I'd be
happy to post some code pointers.

If not, please explain further what it is you're trying to do.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to