UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > cPanel Shared Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-2007, 20:36
Member
 
Join Date: Sep 2006
Posts: 73
Question Password Protect directories with OSCommerce

I have been experimenting with OSCommerce and have launched a couple of shops in the form of on-line galleries. The default installation automatically password protects the ADMIN directory - but I noticed that I actually have to login twice !

That didn't bother me too much - but I recently tried to password protect the whole shop by using cpanel to password protect the shop's root directory. Same effect here - i.e. the logon dialogue comes up twice before you get access !

Password protecting a standard directory seems fine. Any ideas please? I am also posting on the OSCommerce forum.

regards
Chris.
Reply With Quote
  #2 (permalink)  
Old 06-09-2007, 18:57
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,849
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Can you give some more details? It seems like a strange problem.

Are the two password dialogs the same? Or is one a IE password dialog (like you get with password protecting a normal folder where it just asks you once) and one an OSCommerce text box password character input field on a page?
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #3 (permalink)  
Old 06-09-2007, 20:08
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Possibly two .htaccess files which are conflicting with each other. Check to ensure only one .htaccess file is present, and not two - as it will cause problems otherwise.
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #4 (permalink)  
Old 07-09-2007, 17:48
Member
 
Join Date: Sep 2006
Posts: 73
Default

Quote:
Originally Posted by DPS Computing View Post
Can you give some more details? It seems like a strange problem.

Are the two password dialogs the same? Or is one a IE password dialog (like you get with password protecting a normal folder where it just asks you once) and one an OSCommerce text box password character input field on a page?
They look like standard password dialogues to me and they are identical. The second pops up immediately the first is closed - as if you got the password wrong.

Quote:
Originally Posted by Thomas View Post
Possibly two .htaccess files which are conflicting with each other. Check to ensure only one .htaccess file is present, and not two - as it will cause problems otherwise.
I'm not sure how you could have two versions of the same file present in the same directory? Anyhow when I check the directory and files it all looks as expected.

I have created an oscommerce test shop so you can see the effect.
You can logon with "guest" / "password"

http://www.armphotography.co.uk/test_shop

Chris.
Reply With Quote
  #5 (permalink)  
Old 07-09-2007, 18:04
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Check to see if the user hasn't been added twice in the htpasswd file.
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #6 (permalink)  
Old 07-09-2007, 18:20
Member
 
Join Date: Sep 2006
Posts: 73
Default

Thomas - No - there's definitely only one entry for the 'guest' user in the "passwd" file.
Reply With Quote
  #7 (permalink)  
Old 07-09-2007, 18:27
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,849
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

I see what you mean - I had to type the username / password more than twice. In fact I had to enter it about 40 times as I had to enter it for every single image which would suggest to me a directory that should be public, where the images are stored, has actually been secured in error.
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #8 (permalink)  
Old 07-09-2007, 18:29
Member
 
Join Date: Sep 2006
Posts: 73
Default

.. also worth mentioning that this isn't just a one off for me. I have now replicated with four separate test installations.

As I have a reseller account I have tested on three separate domains - with the same result.

Test steps:
(1) Use Fantastico to install a new shop "test_shop" off the public_html directory.
(2) Edit the .htaccess file in the test_shop directory to add the user_globals flag (otherwise oscommerce doesn't work at all)
(3) Test the shop works with no access control on the test_shop directory.
(4) Use cpanel to password protect the test_shop directory with the single 'guest' user.
(5) Re-test access with user logon.

I have posted on oscommerce forum but not had a great response - so presumably not a common issue. A moderator there suspected some duplication in .htaccess or implied perhaps fantastico had added it's own security - but that didn't make sense to me.

Chris.
Reply With Quote
  #9 (permalink)  
Old 07-09-2007, 18:31
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,849
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

I have personally had problems with duplicated .htaccess files in the past so do just double check this after all is set up just to make sure.
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #10 (permalink)  
Old 07-09-2007, 18:41
Member
 
Join Date: Sep 2006
Posts: 73
Default

... still a bit confused on that. How can you have duplicate files? - or would they have different names? In any case there is only one .* file of any sort in the test_shop directory.

What about .htaccess in higher level directories ?
Reply With Quote
  #11 (permalink)  
Old 07-09-2007, 18:43
Member
 
Join Date: Sep 2006
Posts: 73
Default

Quote:
Originally Posted by Chris View Post
In any case there is only one .* file of any sort in the test_shop directory
... at least according to cpanel file manager. Could this get confused?
Reply With Quote
  #12 (permalink)  
Old 08-09-2007, 08:41
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,849
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

They looked funny. It was like .htaccess, .htaccess1 etc so just check there is only one .htaccess* file in the directory.

Don't use cPanel file manager for this, it sometimes hides files that have nothing left of the . - use something like an FTP client, Dreamweaver, Frontpage or Expression Web and make sure any don't display hidden files option is not selected in these clients.
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #13 (permalink)  
Old 08-09-2007, 19:10
Member
 
Join Date: Sep 2006
Posts: 73
Default

No, I've given up on this for now. A work around was to insert another directory with a standard html page containing the link to the 'shop' and put the security on that.
Not great, but sufficient for this application which simply requires privacy rather than security.
Reply With Quote
  #14 (permalink)  
Old 08-09-2007, 19:16
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 4,849
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Glad you found a solution to fit your needs then - if you have any more problems don't hesitate to ask for help .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
NEW LAUNCH! http://djdavid.dpscomputing.com (My DJ Website)
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website)
Reply With Quote
  #15 (permalink)  
Old 08-09-2007, 20:04
Premium Member
 
Join Date: Jan 2007
Posts: 209
Default

Hi Chris,
It seems a redirection issue. Oscommerce redirects to a secure page (folder) by default. You're protected the main folder as well.

What is happening is:
main-site/.htaccess (set by osc) -->redirect-->/yourshop_root/ (which has an htaccess with password)

IN the above scenario, you added
main-site/.htaccess (now with password) -->redirect-->/yourshop_root (which already had password protection)

OSC uses redirection a lot , loads another index file once you get authenticated. But because the parent is password protected, the system asks for password again.

Post your .htaccess file minus username/passwords so that someone may take a look.

Regds
IJ

Last edited by swexpert; 08-09-2007 at 20:10.
Reply With Quote
  #16 (permalink)  
Old 10-09-2007, 20:02
Member
 
Join Date: Sep 2006
Posts: 73
Default

IJ, Thanks for commenting.
Well OSC doesn't auto secure the root. The fantastico installation secures the admin sub-folder only. So a default installation doesn't event have a .htaccess in the root. The only password protection entry here is that installed by cpanel.

In your above scenario I'm not sure what is meant by 'main-site' - isn't that the same as shop-root?

regards
Chris.
Reply With Quote
  #17 (permalink)  
Old 10-09-2007, 21:02
Premium Member
 
Join Date: Jan 2007
Posts: 209
Default

Hello,
By main-site I meant the document root of your domain. shop root would be yourdomain.tld/shop or yourdomain.tld/order

Ideally there should be an .htaccess file in all subfolders of OSC root with various settings such as register_globals and others.

I'll check yuor issue up try to recreate your environment in one of my website hostings and then get back to you soon (about 1 day).

Regds
IJ
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 20:31.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles