Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2011
    Posts
    5
    Plugin Contributions
    0

    application error Help Troubleshoot CHROOT setup

    Hello,

    I'm trying to setup a zen-cart instance in a chroot environment, and am having a problem with the admin interface - it goes into a redirect loop (login.php) when I try to open the index.

    I've checked both configure.php settings and they're correct as best I can tell, and I've checked all the file/directory permissions to the best of my ability. I've found a few posts with the same redirect loop error (which actually comes from my browser, chromium) of "This webpage has a redirect loop" ... "Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects." I've tried all the suggestions I could find on those, but no luck so far.

    This chroot setup uses sbox, to check/enhance security and do the chroot. Any pointers to try/check?

    Thanks,
    Jesse Norell



    - Hosting platform is a debian squeeze server running dtc control panel - I had the site setup under a mod_php security mode and that worked - I then changed the site to sbox_aufs for better security, and am trying to set it up (from scratch - 100% complete reinstall).

    - using zen-cart-v1.3.9h-full-fileset-10262010.zip with no addons, just trying an initial install.

    - I added enable_error_logging.php to admin/includes/extra_configures/ but I don't get any debugging files in the cache directory.

  2. #2
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,102
    Plugin Contributions
    2

    Default Re: Help Troubleshoot CHROOT setup

    1. If you use a browser other than Google Chrome what happens?
    2. Debian has its own rules regarding mod rewrite. It is not an Apache server and does not support standard .htaccess commands.

    Vger

  3. #3
    Join Date
    Aug 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Help Troubleshoot CHROOT setup

    Quote Originally Posted by Vger View Post
    1. If you use a browser other than Google Chrome what happens?
    Vger
    Same problem, a little variation on the message. Eg. Iceweasel prints:

    The page isn't redirecting properly

    Iceweasel has detected that the server is redirecting the request for this address in a way that will never complete.

    * This problem can sometimes be caused by disabling or refusing to accept cookies.

    Tracing the http, my browser is sending requests like:

    GET /myadmin/login.php?zenAdminID=2f01583b5bapjs8o7f52bv2sv1 HTTP/1.1
    And I get a reply like:

    HTTP/1.1 302 Moved Temporarily.
    Date: Fri, 26 Aug 2011 02:37:27 GMT.
    Server: Apache/2.x.x.
    X-Powered-By: PHP/5.3.3-7+squeeze3.
    Expires: Thu, 19 Nov 1981 08:52:00 GMT.
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0.
    Pragma: no-cache.
    Set-Cookie: zenAdminID=eagc7q94p5j6nachrd73e3la93; path=/cgi-bin; domain=.www.domain.com; HttpOnly.
    Location: http://www.domain.com/myadmin/login....nachrd73e3la93.
    Vary: Accept-Encoding.
    Content-Encoding: gzip.
    Content-Length: 20.
    Keep-Alive: timeout=15, max=83.
    Connection: Keep-Alive.
    Content-Type: text/html; charset=iso-8859-1.
    .
    And that just repeats till the browser gives up.


    Quote Originally Posted by Vger View Post
    2. Debian has its own rules regarding mod rewrite. It is not an Apache server and does not support standard .htaccess commands.
    Vger
    Hmm... it is running Apache 2.2.16. I've used .htaccess files without problems previously, and I typically use the Apache foundation's documentation, including for mod_rewrite (which doesn't look to be used in any of zen-cart's .htaccess files that I see).

    DTC does most of the vhost apache config, including the sbox chroot environment .. just trying to figure out what needs to match up/change between the chroot and actual environment.

    Thanks...

  4. #4
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,102
    Plugin Contributions
    2

    Default Re: Help Troubleshoot CHROOT setup

    Okay, can you try using either IE, Firefox, Opera or Safari as the browser - and make sure that whatever browser you use will allow cookies? Also make sure to turn gzip off for Zen Cart, even if this means doing it via the db in phpMyAdmin.

    Vger

  5. #5
    Join Date
    Aug 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Help Troubleshoot CHROOT setup

    Quote Originally Posted by Vger View Post
    Okay, can you try using either IE, Firefox, Opera or Safari as the browser - and make sure that whatever browser you use will allow cookies?
    I tried Firefox, and it's the exact error as IceWeasel gives (just change "Iceweasel" to "Firefox" in the error text).

    The browsers do allow cookies, and both worked with zen-cart before I started this chroot setup.


    Quote Originally Posted by Vger View Post
    Also make sure to turn gzip off for Zen Cart, even if this means doing it via the db in phpMyAdmin.

    Vger
    I'll drop the database and run through another install when I get a chance, but I think this means gzip is disabled:

    mysql> select * from configuration where configuration_key = 'GZIP_LEVEL';
    +------------------+-------------------------+-------------------+---------------------+---------------------------+------------------------+------------+---------------+---------------------+--------------+----------------------------------------+
    | configuration_id | configuration_title | configuration_key | configuration_value | configuration_description | configuration_group_id | sort_order | last_modified | date_added | use_function | set_function |
    +------------------+-------------------------+-------------------+---------------------+---------------------------+------------------------+------------+---------------+---------------------+--------------+----------------------------------------+
    | 298 | Enable GZip Compression | GZIP_LEVEL | 0 | 0= off 1= on | 14 | 1 | NULL | 2011-08-23 13:04:12 | NULL | zen_cfg_select_option(array('0', '1'), |
    +------------------+-------------------------+-------------------+---------------------+---------------------------+------------------------+------------+---------------+---------------------+--------------+----------------------------------------+
    1 row in set (0.00 sec)
    Or do you mean the "Content-Encoding: gzip" in http? I'll have to look into disabling that.


    I'll note that each redirect has a different zenAdminID value, would it seem that zen-cart is having a problem storing that on the server for a subsequent lookup/match?

    I'll keep looking at the cookies too, and compare to a working site.

    Thanks!

  6. #6
    Join Date
    Aug 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Help Troubleshoot CHROOT setup

    Hey, I found one issue with the cookie - the path was wrong, set to /cgi-bin/ (which incidentally is the path to sbox), so I put this in admin/includes/configure.php:

    define('CUSTOM_COOKIE_PATH', DIR_WS_ADMIN);
    And now my browser is sending a cookie back with its HTTP requests. Still in a redirect loop with login.php (which is no longer trying to set a cookie), but I think that's progress. I'm out of time at the moment, I'll keep working on it later.

    My current HTTP GET and reply is:

    GET /my_admin/login.php HTTP/1.1.
    Host: www.domain.com.
    User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20100101 Firefox/6.0.
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8.
    Accept-Language: en-us,en;q=0.5.
    Accept-Encoding: gzip, deflate.
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
    Connection: keep-alive.
    Cookie: zenAdminID=s3ffsbmj5hs7p737d4gs3sv0c3.



    HTTP/1.1 302 Moved Temporarily.
    Date: Fri, 26 Aug 2011 19:25:51 GMT.
    Server: Apache/2.x.x.
    X-Powered-By: PHP/5.3.3-7+squeeze3.
    Expires: Thu, 19 Nov 1981 08:52:00 GMT.
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0.
    Pragma: no-cache.
    Location: http://www.domain.com/my_admin/login.php.
    Vary: Accept-Encoding.
    Content-Encoding: gzip.
    Content-Length: 20.
    Keep-Alive: timeout=15, max=83.
    Connection: Keep-Alive.
    Content-Type: text/html; charset=iso-8859-1.
    .
    ....................

  7. #7
    Join Date
    Aug 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Help Troubleshoot CHROOT setup

    Just a follow-up on this issue, the problem was the environment variables coming out of the sbox setup; there'll be a fixed sbox version out soon (looks like it'll be 1.11.6-1), but the latest git versions have it working (as of commit ded0000592 in gplhost.com sbox repo).

    For anyone needing a webhosting control panel, I'll say this setup looks very nice, using the dtc package with the sbox_aufs security mode. You get a nice chroot separation for all your accounts. (Note, I'm just an end user, not selling anything, it's all free software.)

  8. #8
    Join Date
    Oct 2012
    Posts
    23
    Plugin Contributions
    0

    Default Re: Help Troubleshoot CHROOT setup

    I had this problem because of seo url's. I changed it to false and everything works now.

 

 

Similar Threads

  1. Canada Post shipping calculator - Can someone help me troubleshoot this??
    By Exavia in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 Jun 2011, 10:37 PM
  2. specials not applying in shopping cart - troubleshoot help requested
    By shaztesting in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 10 Sep 2009, 07:22 PM

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
  •