Zen Cart Logo
Forums / Upgrading to 1.5.x / Apache .htaccess Support = OFF

Apache .htaccess Support = OFF

Views: 8,210

Results 1 to 14 of 14
4 Jan 2012, 9:12 PM
#1
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Apache .htaccess Support = OFF

just installed 1.5 final to my live site and got this
Apache .htaccess Support = OFF should I take it up with my host

4 Jan 2012, 9:13 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

Yes, you need to talk to them ASAP.

4 Jan 2012, 10:50 PM
#3
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

Kim:

Yes, you need to talk to them ASAP.

thanks thought so

11 Jan 2012, 5:04 PM
#4
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

Just got this from my web host
Thanks for contacting us.
.htaccess support is enabled by default on our systems, looking in your webspace you have one already there that is extensively used.
Do you know how zen cart detects this as it is enabled?
Any ideas why I got the warning?

11 Jan 2012, 5:08 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Apache .htaccess Support = OFF

Zen Cart is looking to see whether the .htaccess files are properly protecting against unauthorized access of files which the .htaccess should be blocking. And if it's able to gain access to those files despite the presence of .htaccess then it raises that warning.

See the Apache section of this article: https://www.zen-cart.com/tutorials/index.php?article=287

11 Jan 2012, 8:50 PM
#6
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

DrByte:

Zen Cart is looking to see whether the .htaccess files are properly protecting against unauthorized access of files which the .htaccess should be blocking. And if it's able to gain access to those files despite the presence of .htaccess then it raises that warning.

See the Apache section of this article: https://www.zen-cart.com/tutorials/index.php?article=287

Thanks DrByte I've send the link to my web host see what they have to say.

12 Jan 2012, 11:57 AM
#7
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

Heres the reply I've got from my hosting company
Thanks for your reply.

Unfortunately this does not explain how ZenCart itself performs the check on whether Apache .htaccess Support is enabled.

Sadly what you will need to do is contact the ZenCart support in order to find out why the Zen Cart fails this test.

What you may find is that the Zen Cart test is calling the Domain Name from within the hosting, which creates a loopback call which sadly is not permitted by our Firewalls, which would block the test resulting in a fail. Unfortunately if this is the issue, this is something that we cannot enable as it will be detrimental to the shared hosting platform.

I can confirm that all of our servers have .htaccess Support enabled, so its likely down to the Zen Cart itself, which would really need input from their support.
12 Jan 2012, 5:09 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Apache .htaccess Support = OFF

Yes, it's doing a call back to your own store, via CURL, to attempt to access a file that the .htaccess rules should have blocked. It's looking for a response that indicates that the file access has been blocked. It is expecting to NOT receive an HTTP 200 OK response.
If your host's firewall is blocking things, then it would trigger something other than a 200 response, which then Zen Cart would treat as correct.
So, your host's loopback explanation still doesn't make sense, unless their loopback system is incorrectly responding with an HTTP 200 response instead of an actual ERROR response. Perhaps your host should look at how they serve up their error messages.

13 Jan 2012, 2:26 PM
#9
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

DrByte:

Yes, it's doing a call back to your own store, via CURL, to attempt to access a file that the .htaccess rules should have blocked. It's looking for a response that indicates that the file access has been blocked. It is expecting to NOT receive an HTTP 200 OK response.
If your host's firewall is blocking things, then it would trigger something other than a 200 response, which then Zen Cart would treat as correct.
So, your host's loopback explanation still doesn't make sense, unless their loopback system is incorrectly responding with an HTTP 200 response instead of an actual ERROR response. Perhaps your host should look at how they serve up their error messages.

Their reply:-

Unfortunately our firewalls block any kind of loopback and when it does, it does not provide any kind of response, the check itself will not be able to run as it would be instantly blocked.

I have spoken to our Systems Administrators and they inform me that if there is a way to bypass this check then ZenCart will run without any issues.

Are you able to bypass this check?

Don't like the sound of this.

13 Jan 2012, 10:44 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Apache .htaccess Support = OFF

You normally access your site like this: 'http://your_domain.com/your_store_foldername_if_any**/index.php** .... right?

If you try to visit 'http://your_domain.com/your_store_foldername_if_any**/includes/functions/functions_general.php** .... what happens?

That's basically what zc_install is doing, and is expecting to get a 403-forbidden or similar response other than "200 OK".

14 Jan 2012, 1:24 AM
#11
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

DrByte:

You normally access your site like this: 'http://your_domain.com/your_store_foldername_if_any**/index.php** .... right?

If you try to visit 'http://your_domain.com/your_store_foldername_if_any**/includes/functions/functions_general.php** .... what happens?

That's basically what zc_install is doing, and is expecting to get a 403-forbidden or similar response other than "200 OK".

typed in http://www.rvsolarsystems.co.uk/includes/functions/functions_general.php
got

403 Forbidden

You don't have permission to access /includes/functions/functions_general.php on this server.

Apache/2 Server at https://www.rvsolarsystems.co.uk Port 80is this what I should get

14 Jan 2012, 1:32 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Apache .htaccess Support = OFF

Yes, that's what you want to get.

So, because your hosting company is doing oddball stuff which breaks the self-detection, you can ignore when zc_install warns you about that.

14 Jan 2012, 4:10 AM
#13
discoverytdi avatar

discoverytdi

Totally Zenned

Join Date:
May 2011
Location:
Sunny Rossendale (not)
Posts:
562
Plugin Contributions:
0

Re: Apache .htaccess Support = OFF

DrByte:

Yes, that's what you want to get.

So, because your hosting company is doing oddball stuff which breaks the self-detection, you can ignore when zc_install warns you about that.

Thanks DrByte for all your help really appreciate it had visions of having to move hosts again :censored: think it's about time I put my hand in my pocket and sent you guys a donation.

14 Jan 2012, 4:45 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Apache .htaccess Support = OFF

Always appreciated. And thanks.

Glad you got it cleared up.