Results 1 to 3 of 3

Threaded View

  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

 

 

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

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