Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Dec 2006
    Location
    near Atlanta Georgia
    Posts
    194
    Plugin Contributions
    0

    Default Support for ".htaccess" files is not enabled or is not operating correctly.

    Does ZenCart 1.5.7 come with an .htaccess file because I don't see one in the unzipped file directory? My host (hostmonster) technical support says I need to add the information to the .htaccess file. I don't remember ever having to do this before...
    John

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    Zen Cart doesn't come with a .htaccess for the first directory, because it doesn't need one.
    It has various types of .htaccess content in various subdirectories in order to protect those directories specifically.

    If you need one in the public_html directory of your store for specialized reasons, just create one and put into it whatever you need.

    If you're writing this post because zc_install is telling you .htaccess protections are not supported properly, then that's because zc_install tried to access files that SHOULD be protected by the supplied .htaccess files, but that access was not properly blocked. In that case you either didn't upload the .htaccess files that come in the various subdirectories (sometimes Windows hides those files or FTP programs skip them), or your hosting company's server rules aren't working to enable the .htaccess stuff.
    .

    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.

  3. #3
    Join Date
    Dec 2006
    Location
    near Atlanta Georgia
    Posts
    194
    Plugin Contributions
    0

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    Here is a screen shot:
    Click image for larger version. 

Name:	screenshot1.jpg 
Views:	128 
Size:	37.4 KB 
ID:	19125
    John

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    Ya, you probably didn't upload the .htaccess files that exist in the various subdirectories.
    .

    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.

  5. #5
    Join Date
    Dec 2006
    Location
    near Atlanta Georgia
    Posts
    194
    Plugin Contributions
    0

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    There was no htaccess file in the new subdirectory folder for my new version and I had to tell my host to upgrade the PHP to 7.3 for that folder as my current running version broke with newer php. Host tech support enabled the 7.3 on the new site folder and added an .htaccess file. The php error went away but the ones in my screen shot didn't. I just deleted the .htaccess file and the 7.3 error returned. I'm lost.
    Click image for larger version. 

Name:	screenshot2.jpg 
Views:	67 
Size:	44.3 KB 
ID:	19126
    John

  6. #6
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    Part of the problem may be the PHP level of the older version of Zen Cart.

    If you are trying to run two PHP levels that are not compliant with BOTH versions of Zen Cart, it will not work if the carts are at the same level.

    Your older cart probably has the .htaccess file because your cPanel set the file either through cPanel's setting the PHP, setting a 301 redirect, or both. Most cPanel-created .htaccess files are to set the PHP for that folder. Here's an example of both.
    Code:
    # Needed before any rewriting
    RewriteEngine On
    
    
    # Redirect HTTP with www to HTTPS without www
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule .* https://%1%{REQUEST_URI} [R=301,L]
    # Redirect HTTP without www to HTTPS without www
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    # Redirect HTTPS with www to HTTPS without www
    RewriteCond %{HTTPS} on
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule .* https://%1%{REQUEST_URI} [R=301,L]
    
    
    ## 301 Redirects
    
    
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php72” package as the default “PHP” programming language.
    <IfModule mime_module>
      AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
    This makes sure that, no matter if http or www is used, all requests for the domain wind up at htps://YOURDOMAIN.com and sets the PHP level at 7.2 Other than providing a PHP level for the folder, this .htaccess is, as DrByte says, not required for Zen Cart.

    Let's say the older version is in public_html (aka the root) and the PHP is 5.6.4. Nothing you or the host does will "allow" a higher PHP on another folder at the same level. Normally, a site is at "home/public_html". If you move your 1.5.7 folder to "home/", you can then set the 1.5.7 folder to the 7.3 and it will "take". This will allow you to finalize 1.5.7 while ensuring that your older site will be working as well.

    As to the gzip... About five years ago, gzip was slacking off and hosts started using other compression methods. Gzip has turned things around, and we prefer it over the other methods. Thus, we still see a GZip setting in Configuration > GZip Compression.

    You're actually with HostGator and on a wordpress server. That may or may not drive what kind of response they give you.

    Not denigrating your host. One of my main concerns with the current COVID-19 response mode, is customer service. Whereas we used to have several folks at various levels BUT, all within shouting distance of each other. Phone goes to mute, "Hey Fred. You ever run into (insert first-time problem here)." If Fred can't help, Susan will probably know.

    Problem is, Fred and Susan are now at their dining room table miles apart. It's more the luck of the draw with tech support than it ever was. If the person you get has never had such a problem, it's 50/50 that you will get a correct answer. All customer support is having to deal with this now.

  7. #7
    Join Date
    Dec 2006
    Location
    near Atlanta Georgia
    Posts
    194
    Plugin Contributions
    0

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    Do you recommend me migrating away from the hostmonter/hostgator and wordpress server?
    John

  8. #8
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    They are fine hosts. I am concerned with anyone being on a WordPress server as it is so prone to attack. Even they tout a WordPress Security Plugin.

    Just making you aware of the fact you need to visit here to get the straight Zen Cart position before taking their solution.

    I've always said that you could have a PhD in keyboard and not know anything about a mouse.

    They are, naturally, going to be most familiar with what they run into on a daily basis. Doesn't mean they don't know their job. They just might not be completely familiar with ALL scenarios.

    It's not uncommon for a host to point a finger at Zen Cart first and research their setup second.

  9. #9
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    Just the first chart on Infected Websites shows why we decided to not support WordPress, Joomla!, and Magento. Once a hacker finds their way on a server, all sites on the server are vulnerable.

    It's not the host's fault in 99.9% of the cases. Most of the sites that get infected (60+%) were not current when compromised. Magento wins the award for better than 90% of infected sites being non-current at the time of breach.

    If Zen Cart releases a security patch, we make sure it's on all our sites.

    You'll note OsCommerce at 0.3% and Zen Cart is lower than that.

    Unlike Zen Cart, I don't believe any on the list have ever been PCI certified.

  10. #10
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,625
    Plugin Contributions
    123

    Default Re: Support for ".htaccess" files is not enabled or is not operating correctly.

    Interesting article - thanks for sharing.
    That Software Guy. My Store: Zen Cart Modifications
    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 zc_install: Support for ".htaccess" files is not enabled.
    By karma-lab in forum Upgrading to 1.5.x
    Replies: 13
    Last Post: 14 Apr 2020, 02:06 AM
  2. v156 "htaccess' file not enabled
    By Looper in forum General Questions
    Replies: 3
    Last Post: 6 Jul 2019, 08:13 PM
  3. v151 Admin "alternative navigation" page not working correctly
    By dzaborow in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 17 Feb 2015, 03:09 AM
  4. v150 Yellow alert at setup: "Apache .htaccess Support = OFF"
    By dream_mike in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 15 May 2012, 06:36 PM
  5. Comment out "Check for Updates" Button, "Support Site" Link, & "Version" Link?
    By g00glethis1 in forum Customization from the Admin
    Replies: 4
    Last Post: 15 Mar 2010, 06:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR