Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default [Not a ZC Bug] Automatically redirected to admin/installation folder

    I recently found this bug when working on a client's site with these parameters (you can check these status by creating a <?php phpinfo(); ?> file:

    SERVER_SOFTWARE: Microsoft-IIS/6.0
    PHP VERSION: 5.2.4.

    It is not actually the bug of Zen-Cart, but rather the IIS itself, I've never found this problem with Apache Server.

    ------------------------------------------------------------------------------
    I. Technical Description (Warning, might sound too technical,
    maybe you want to jump this part and go to next part instead.)
    ------------------------------------------------------------------------------
    The problem was the website will automatically change its working directory when you go to different folders in the website, say:
    1. you go to admin, (by this time your working directory is changed to admin )
    2. then open up index.php
    3. the index.php will import the files under the admin directory
    4. some of the files inside application_top.php wont be loaded, then it will open up your installation folder, thinking you haven't installed properly.
    5. If you already removed / renamed your installation folder, php will cancel that request and get back to the root folder, which now has been changed to admin folder.

    ------------------------------------------------------------------------------
    II. How to Solve
    ------------------------------------------------------------------------------
    1. I added these lines of code in index.php:

    chdir("D:/Inetpub/[YOUR_WEBSITE_FOLDER]/admin");
    chdir("../");

    It may look lousy, but yeap I used a workaround to access the website folder, which was by going to admin folder first then go up one level.

    Good Luck,

    Jaycode
    Last edited by jaycode; 26 Oct 2007 at 02:20 AM. Reason: typos
    The greatest pleasure in life is doing what people say you cannot do.

    Check on www.WebExtremeCustomiser.com for my modules (free contribution):
    AJAX Image Swapper
    AJAX Banner Swapper
    Fixed Navigation

  2. #2
    Join Date
    Jun 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: [Not a ZC Bug -- Bug is in IIS] Automatically redirected to admin/installation fo

    Great post. Exactly our problem with PHP5.2.4/IIS6.0. We had the hosting company rollback the PHP version since we didn't want to take any further chances.

    I believe this bug is more with PHP than IIS. Previous versions work with II6.0 just fine, only 5.2.4 is causing the issue.

    Or it may be a combination since this issue so far doesn't exist with Apache
    "The one good thing about repeating your mistakes is that you know when to cringe. Lucky Numbers 5, 31, 2, 47, 39, 18" - Fortune Cookie

  3. #3
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default Re: [Not a ZC Bug -- Bug is in IIS] Automatically redirected to admin/installation fo

    Quote Originally Posted by millerjd View Post
    Great post. Exactly our problem with PHP5.2.4/IIS6.0. We had the hosting company rollback the PHP version since we didn't want to take any further chances.
    Thanks, you're right, the best thing to do is rolling back, at least until they came up with a better, more stabile version. The workaround I did just as what it was, a workaround.

    Quote Originally Posted by millerjd View Post
    I believe this bug is more with PHP than IIS. Previous versions work with II6.0 just fine, only 5.2.4 is causing the issue.

    Or it may be a combination since this issue so far doesn't exist with Apache
    Interesting, I agree with that.
    The greatest pleasure in life is doing what people say you cannot do.

    Check on www.WebExtremeCustomiser.com for my modules (free contribution):
    AJAX Image Swapper
    AJAX Banner Swapper
    Fixed Navigation

 

 

Similar Threads

  1. Redirected to Installation Instructions During Checkout...
    By Rick5150 in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 24 Jan 2013, 08:20 PM
  2. Duplicate installation - bizarre admin redirect bug
    By maney89 in forum General Questions
    Replies: 4
    Last Post: 7 Nov 2011, 04:57 PM
  3. [Not a bug] Installation - physical path
    By rhendrix9 in forum Bug Reports
    Replies: 1
    Last Post: 5 Mar 2011, 08:55 PM
  4. Replies: 4
    Last Post: 7 Apr 2008, 03:52 PM
  5. Replies: 1
    Last Post: 18 Feb 2007, 05:22 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