Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Installing on a Windows Server / Redirection to hosted site from locally-hosted test-bed after upgrade

Redirection to hosted site from locally-hosted test-bed after upgrade

Started by lat9 on 14 Nov 2016, 12:56 PM · Views: 6,342

Results 1 to 2 of 2
14 Nov 2016, 12:56 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Redirection to hosted site from locally-hosted test-bed after upgrade

I was upgrading my site (finally!) to 1.5.5, starting with an XAMPP installation with a /local/configure.php override for the hosted configuration.

I started thel upgrade by copying the pre-existing /includes/local/configure.php files to the /includes folder and performed my initial zc_install there. Once I'd completed the upgrade locally, I copied the files to my hosted environment ... first copying the original, Zen Cart 1.5.4 version of the hosted configure.php files to my local installation.

I then ran zc_install on my hosted site and I'm up and running ... except that I could no longer log into my locally-hosted admin. Whenever I entered my locally-hosted admin's URL, I was redirected to my hosted storefront ... what the :censored:?

Since my locally-hosted installation now included that Zen Cart 1.5.4 /myadmin/includes/configure.php file, the constants that are moved (in Zen Cart 1.5.5) to the /includes/defined_paths.php were being pre-defined in that back-level hosted version of the file! That's where the unintended "re-direct" to my hosted storefront was coming from.

Copying down the Zen Cart 1.5.5 version of the hosted configure.php files allowed me (again) to log into my locally-hosted admin.

Posting the symptoms and solution here to hopefully save others some time!

14 Nov 2016, 4:52 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Redirection to hosted site from locally-hosted test-bed after upgrade

Yes: using v1.5.4 configuration files on a v1.5.5 site will produce unintended side-effects such as you describe.

Running zc_install (just visiting its home page) will convert the files to the new format for you.

(Granted, it's a known issue that it doesn't convert the files in your "/local/" subdirectories at this time.)

.
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.