Forums / Upgrading to 1.5.x / zc_install: Support for ".htaccess" files is not enabled.

zc_install: Support for ".htaccess" files is not enabled.

Views: 7,176

Results 1 to 14 of 14
8 Apr 2019, 3:23 AM
#1
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

zc_install: Support for ".htaccess" files is not enabled.

Before attempting to upgrade my existing 155a store to 156, I have a demo version of the default 155a installed, that I am trying the upgrade process on.

When running the zc_install script, it is warning me that "Support for ".htaccess" files is not enabled."

Clicking on this error shows (in part) the following information:

Possible causes:

You may not be using Apache as your Web Server (".htaccess" files are unique to the Apache Web Server), or,
Support for ".htaccess" is disabled or misconfigured, or,
The ".htaccess" files that come with Zen Cart have not been uploaded to your site.
Files starting with ".", such as ".htaccess" files, are usually treated as "hidden" files and your FTP program may have failed to upload these if you have turned off the display and/or transfer of such hidden files in its settings.

However,

  1. my ISP is using Apache; Easy Apache 4 I believe.
  2. support for .htaccess is NOT disabled; I use and am using .htaccess files in many places successfully.
  3. The .htaccess file in the includes folder has been uploaded.

Any reason why this warning would be showing in light of the above? Is there any way to "test" whether the .htaccess file is blocking what it is supposed to be blocking?

8 Apr 2019, 3:36 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: zc_install: Support for ".htaccess" files is not enabled.

That message appears when zc_install does a test to see if .htaccess rules are properly blocking access to files that nobody has any business accessing from a browser.

You can simulate the very same test by going to: http:// your_site.com/includes/filenames.php
It's expecting a 403 Forbidden response.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Apr 2019, 3:43 AM
#3
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: zc_install: Support for ".htaccess" files is not enabled.

Thanks. I meant to say I was upgrading 155f to 156a.

I went ahead and did the upgrade and it completed successfully.

By running the test, I am indeed getting a 403 error page. So it would seem that the upgrader is incorrectly reporting this warning, possibly.

9 Apr 2019, 5:22 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: zc_install: Support for ".htaccess" files is not enabled.

karma-lab:

By running the test, I am indeed getting a 403 error page. So it would seem that the upgrader is incorrectly reporting this warning, possibly.
Maybe. It's not intended to be perfect. It's limited in what it can do, since it's simulating a visit, but coming from the same server as the site it's testing ... which may influence the results in some cases depending on server configuration. It can't catch every situation, but it's intended to make you investigate ... so it's doing its job at least ;)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 Apr 2019, 6:49 AM
#5
karma_lab avatar

karma_lab

Zen Follower

Join Date:
Apr 2008
Posts:
135
Plugin Contributions:
0

Re: zc_install: Support for ".htaccess" files is not enabled.

Thanks. How true. ;)

But might I suggest that you include the directions for performing this test in the further information that comes up when you click on this warning?

Something like:

This test/analysis is not 100% conclusive. If you believe that your .htaccess support is correctly configured, after the upgrade you can test it by attempting to load the following URLS. blah-blah etc.

That might avoid questions like this in the future. Just a suggestion.

13 Apr 2020, 10:16 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,864
Plugin Contributions:
18

Re: zc_install: Support for ".htaccess" files is not enabled.

Revisiting due to .htaccess error loading trial 1.5.7

When I try the "filenames.php" test, I get status "301 Moved Permanently", which redirects to a page "403.shtml", which itself returns status "404 Not Found"

Maybe some of this info will help```
===[root@host 1102428]# curl -ILs http://test.netzencommerce.com/includes/filenames.php
HTTP/1.1 301 Moved Permanently
Date: Mon, 13 Apr 2020 20:35:51 GMT
Server: Apache
Location: https://test.netzencommerce.com/403.shtml
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 404 Not Found
Date: Mon, 13 Apr 2020 20:35:51 GMT
Server: Apache
Content-Type: text/html; charset=iso-8859-1

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

13 Apr 2020, 10:42 PM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: zc_install: Support for ".htaccess" files is not enabled.

Can you describe the environment and symptoms?

  • You are installing on what platform?
  • You try to do a zc_install and get blocked?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

13 Apr 2020, 10:45 PM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: zc_install: Support for ".htaccess" files is not enabled.

OK I see - you get that message on the zc_install screen.

Let me look at that but please keep going. Run zc_install and install.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

13 Apr 2020, 10:47 PM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,864
Plugin Contributions:
18

Re: zc_install: Support for ".htaccess" files is not enabled.

I'm getting myself in trouble again using "error"

This is the same notice received by the OP, discussed in the closed item I commented on earlier, and information as to how our Apache servers are responding to the test offered by DrByte.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

13 Apr 2020, 11:24 PM
#10
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: zc_install: Support for ".htaccess" files is not enabled.

Please make the following edit:
zc_install/includes/classes/class.systemChecker.php line 347
change 'http://'
to 'https://'

(just add the "s")

and then retry.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

14 Apr 2020, 12:26 AM
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,864
Plugin Contributions:
18

Re: zc_install: Support for ".htaccess" files is not enabled.

That worked which leads me to believe we have more of a problem.

With it set to https, the folks without an SSL will get an error and with it left to http, the folks WITH SSL will get an error. It won't work with just // as some links will.

Do you gather the same from the results?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

14 Apr 2020, 12:36 AM
#12
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: zc_install: Support for ".htaccess" files is not enabled.

Don't worry - this issue will be fixed before the release. Thank you for your help in testing.

Please proceed - let's see what else you can find!

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

14 Apr 2020, 12:51 AM
#13
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: zc_install: Support for ".htaccess" files is not enabled.

If you have time, it would be a big help for you to pull the file out of

https://github.com/zencart/zencart/pull/3249

and try this test again. Should work for both http:// and https:// environments.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

14 Apr 2020, 1:06 AM
#14
drbyte avatar

drbyte

Sensei

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

Re: zc_install: Support for ".htaccess" files is not enabled.

dbltoe:

Revisiting due to .htaccess error loading trial 1.5.7

When I try the "filenames.php" test, I get status "301 Moved Permanently", which redirects to a page "403.shtml", which itself returns status "404 Not Found"

Maybe some of this info will help```
===[root@host 1102428]# curl -ILs http://test.netzencommerce.com/includes/filenames.php
HTTP/1.1 301 Moved Permanently
Date: Mon, 13 Apr 2020 20:35:51 GMT
Server: Apache
Location: https://test.netzencommerce.com/403.shtml
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 404 Not Found
Date: Mon, 13 Apr 2020 20:35:51 GMT
Server: Apache
Content-Type: text/html; charset=iso-8859-1

You'll notice that zc_install is indeed following the server's redirect. 
So, why not fix the server's broken redirect instead of having the server return a 404-not-found?
Zen Cart shouldn't have to magically figure out why your server is giving an incorrect response.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.