Pages with images ask for password

4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 20, 2009   (RSS)

By timofee - January 19, 2009

I have successfully added CMS Builder to 3 sites now with great results. Unfortunately, I've hit a problem with a client who wants to add images to their pages, the symptoms are as follows:

When a visitor tries to call up a page with images they are prompted to supply the .htaccess password that I've protected the cmsAdmin directory with. Of course they can click cancel, but if there are 5 images on the page they have to click cancel 5 times. As there is absolutely no problem displaying a page without images, I've temporarily fixed it by commenting the images out in the HTML view within CMS Builder.

I've double checked the permissions on the files and folders within the cmsAdmin directory and everything is fine. As there is no problem uploading images or adding them to the page via the CMS Builder interface, I don't think this is the problem.

I suspect that the answer to the problem will be to remove the "require user xxxxxxxx" line that I've added to the bottom of the .htaccess file in the cmsAdmin directory, but I am keen to provide this extra layer of security for the client.

Has anyone seen this problem before and is there a better fix?

Thanks in advance,

Tim

Re: [myraltis] Pages with images ask for password

By timofee - January 19, 2009

After further investigation I can confirm that the lines I've added to the .htaccess file in the cmsAdmin directory is causing the problem.

I added:

AuthUserFile /usr/local/etc/.htpasswd
AuthGroupFile /dev/null
AuthName "Enter Username and Password"
AuthType Basic

require user xxxxxxxx


This has the effect of prompting the viewer for the username and password for every image on the page.

With the code removed from .htaccess all images are displayed without a problem.

I want to keep the password protection - what can I do?

Tim

Re: [myraltis] Pages with images ask for password

By Dave - January 19, 2009

Hi Tim, welcome to the CMS Builder forum! :)

Change the upload directory and url under: Admin > General Settings to be outside of the /cmsAdmin/ directory.

Once you've done that erase any old uploads and upload new files and you should be fine.

Let me know if that fixes it for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Pages with images ask for password

By timofee - January 20, 2009

Thank you Dave.

Did as instructed and problem solved.

Tim