Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2009
    Posts
    6
    Plugin Contributions
    0

    Default How do I reach admin path via server virtual path?

    Hi there -

    Is there a way of reaching the admin panel without it redirecting to the full domain name for the site?

    For example,

    http://host.somesuchhost.com/~somesite/store/admin/

    I am trying to troubleshoot a client template issue on our php 5 server, while temporarily having moved their site to another server where the domain currently resolves to.

    Any time I try to access the admin on the first server, it is redirecting to the full website path with the domain name.

    Any way for me to work around that?

    Thanks.

    Mike

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

    Default Re: How do I reach admin path via server virtual path?

    If you're moving the site to another server, here is the process to follow to automatically build the correct paths in the configuration settings: https://www.zen-cart.com/tutorials/i...hp?article=100
    .

    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
    Jun 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: How do I reach admin path via server virtual path?

    Quote Originally Posted by DrByte View Post
    If you're moving the site to another server, here is the process to follow to automatically build the correct paths in the configuration settings: https://www.zen-cart.com/tutorials/i...hp?article=100
    Thanks for the response - however, this is not quite what is being done here, so it doesn't actually solve my issue.

    The site was on our php 5 server. It had problems due to compatibility issue with a third-party template, so we moved the client's site to a php 4 server as an interim measure.

    It is working perfectly there.

    In troubleshooting the copy of the site that still exists on the php 5 server, we can use the server paths to access the site itself and reproduce the errors.

    We also want to access the admin panel on the copy of the site on the php5 server. However, when we use the server path, it redirects to the actual domain name path.

    So, on the live server, we have -

    www.domain.com/store

    Let's call the other the test server -

    On the test server, we have -

    host.hostname.com/~user/store <- this works fine

    If I look to access the admin panel on the test server -

    host.hostname.com/~user/store/admin ... this redirects back to the domain name, so it redirects to -

    www.domain.com/store/admin ... which works fine, but is hosted on the live server, which is not where I want to access.

    If actual details would be more helpful, I can PM them to you.

    Thanks.

    Mike

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

    Default Re: How do I reach admin path via server virtual path?

    So, to make the storefront work on the other server, you had to edit the /includes/configure.php file, right?
    You'll need to make similar edits to the /admin/includes/configure.php file if you want the admin to work too.

    The FAQ article simply documents the "easiest" approach to auto-generating the correct contents of the configure.php files for the server you're running from.
    .

    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
    Jun 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: How do I reach admin path via server virtual path?

    Quote Originally Posted by DrByte View Post
    So, to make the storefront work on the other server, you had to edit the /includes/configure.php file, right?
    You'll need to make similar edits to the /admin/includes/configure.php file if you want the admin to work too.

    The FAQ article simply documents the "easiest" approach to auto-generating the correct contents of the configure.php files for the server you're running from.
    No, again, that's not the issue.

    When moving the site, all I do was a cpanel transfer between servers. It is transparent. No paths are changing - everything is precisely the same.

    If you're telling me that admin.php automatically redirects to paths found in the configuration file, then I can simply go an modify the config file directly. However, since I can access the site itself without any modification to /includes/configure.php, I would not expect to need to modify the config to access the admin panel - unless it's coded this way for security purposes.

    mrk

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: How do I reach admin path via server virtual path?

    When moving the site, all I do was a cpanel transfer between servers. It is transparent. No paths are changing - everything is precisely the same.
    On a different server, the domain name will not be accessible unless the nameservers for the domain are altered....
    You can do this by assigning a dedicated IP to the test account and using this IP in place of the domain name in both configure.php files....you virtual and actual paths will not need to be altered
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jun 2009
    Posts
    6
    Plugin Contributions
    0

    Default Re: How do I reach admin path via server virtual path?

    Okay, my question has been entirely misunderstood.

    A site doesn't work on Server A. It's been moved to Server B.

    The nameservers were changed, they resolve - all is well.

    The site works perfectly on Server B.

    I am in the interim troubleshooting the issues with this site on server A. Since the domain name now resolves to server B, I can access everything via the server's virtual path as outlined in the previous emails. This works fine for everything other than the admin.

    However, the last post led me in the right direction.

    I needed to update the path in the admin config file so it uses the virtual server path and not the domain name path.

    I needed to update this line -

    define('HTTP_SERVER', 'http://host.hostname.com/~user/'); and replace the domain name with the path to the server.

    It now does exactly what I need for troubleshooting purposes.

    Thanks.

    Mike

 

 

Similar Threads

  1. Wierd path error on download file path
    By captainmurph in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 21 Jan 2011, 02:44 PM
  2. error in path (function.session-save-path) after switching servers
    By stitch in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 16 Feb 2010, 09:37 AM
  3. Javascript virtual path not working
    By chillout_buddha in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Nov 2009, 06:07 PM
  4. Virtual Path & Physical path
    By Bread_O in forum Basic Configuration
    Replies: 2
    Last Post: 22 May 2007, 04:54 PM
  5. Need to change virtual path, but how?
    By chrispowers in forum General Questions
    Replies: 1
    Last Post: 12 Jun 2006, 11:59 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR