Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2009
    Posts
    102
    Plugin Contributions
    0

    Default Moving to new server, IP in configure.php?

    I just got hold on a new server onto which I've uploaded my shop. It kind of works, but not flawlessly. www.mydomain.com is still pointing to my old server as I test the new one out.

    My folder structure is:
    -public_html
    ---myshop

    From my host I've received a temporary address, like http://111.111.11.1/~username which I'm using atm for testing purposes.

    This is my new server configure.php settings...
    Code:
      define('HTTP_SERVER', 'http://111.111.11.1/~username');
      define('DIR_WS_CATALOG', '/myshop/');
      define('DIR_FS_CATALOG', '/home/username/public_html/myshop/');
    and my adminfolder/configure.php settings...
    Code:
      define('HTTP_SERVER', 'http://111.111.11.1/~username');
      define('HTTP_CATALOG_SERVER', 'http://111.111.11.1/~username');
      define('DIR_WS_ADMIN', '/myshop/adminfolder/');
      define('DIR_WS_CATALOG', '/myshop/');
      define('DIR_FS_ADMIN', '/home/username/public_html/myshop/adminfolder/');
      define('DIR_FS_CATALOG', '/home/username/public_html/myshop/');
    Is this correct?

    There are several issues...
    (1) zenid= wont go away after the first click
    (2) when going to http://111.111.11.1/~username/adminfolder I cannot log in, "There was a security error when trying to login.". After some searching there's something with a security token(?)
    (3) I cannot add stuff to shopping cart
    (4) I cannot log in as a customer ("An error has occured")

    I don't know if everything has to do with zenid= or not...

    Any ideas?

  2. #2
    Join Date
    Mar 2009
    Posts
    89
    Plugin Contributions
    0

    Default Re: Moving to new server, IP in configure.php?

    Did you follow all the instructions in the tutorial: https://www.zen-cart.com/tutorials/i...hp?article=100

  3. #3
    Join Date
    Mar 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Moving to new server, IP in configure.php?

    Quote Originally Posted by davowave View Post
    Did you follow all the instructions in the tutorial: https://www.zen-cart.com/tutorials/i...hp?article=100
    The thing is that if I install a fresh version, zenid is still there and there's still a "security error" when logging in to the adminfolder. I'm leaning towards thinking that one cannot have an IP address as http_server in configure.php.

    If I'm right, this makes it impossible to check for installation errors on new installs(?) when one hasn't redirected the domain name(?)

    *edit*
    https://www.zen-cart.com/tutorials/i...hp?article=312
    "- you've set your site up on an IP address instead of a domain name, thus preventing session cookies from being set properly"

    I'm afraid that I was right... but now what? So I have to point my domain name prior to being able to check for installation and server issues?

    And what about that zenid thing? Is it the same cause?
    Last edited by scrap; 14 Apr 2012 at 02:01 PM.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Moving to new server, IP in configure.php?

    Read the first few posts in the following thread:

    http://forums.cpanel.net/f185/tweak-...ty-121605.html

    Post #7 is particularly relevant
    20 years a Zencart User

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Moving to new server, IP in configure.php?

    Quote Originally Posted by scrap View Post
    If I'm right, this makes it impossible to check for installation errors on new installs(?) when one hasn't redirected the domain name(?)
    The issue has NOTHING to do with zencart... it is a server setting involving "Tweak mod_userdir".

    Rather than an IP address, you should use a server path.

    If you have SSL installed, just set it to FALSE in the config files. The cert refers to a domain and a specific IP associared with the domain. No wonder it fails on that IP...

    And even if the feature is enabled (disabled) by your host, MOST functions are unlikely to work.

    When configured, it WILL show a ZC home page... and if it does, that GENERALLY means the install went well. Don't try to test functions until the DNS is resolved.
    Last edited by schoolboy; 14 Apr 2012 at 02:17 PM.
    20 years a Zencart User

  6. #6
    Join Date
    Mar 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Moving to new server, IP in configure.php?

    Thank you for the clarification! I just pointed an unused domain name to the new server and will check for errors using it before pointing the real domain the the server.

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Moving to new server, IP in configure.php?

    Quote Originally Posted by scrap View Post
    From my host I've received a temporary address, like http://111.111.11.1/~username
    This is a URL, which isn't the same as an 'address'

    Quote Originally Posted by scrap View Post
    This is my new server configure.php settings...
    define('HTTP_SERVER', 'http://111.111.11.1/~username');
    Technically this is invalid. The "server" (in this case) would/should be 'http://111.111.11.1' with the '~username' being a part of the file path... as such...

    define('DIR_WS_CATALOG', /~username'/myshop/');

    The following define:
    define('DIR_FS_CATALOG', '/home/username/public_html/myshop/')
    is in the correct format. (note, no tilde (~) required in this instance.

    I'm not going to say that making these changes will fix all your problems (because for the most part, the HTTP_SERVER and DIR_WS_CATALOG defines are simply combined to produce the full URL before use anyway, but it will make a subtle difference as to the way session data stored.

    Cheers
    Rod

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

    Default Re: Moving to new server, IP in configure.php?

    Quote Originally Posted by scrap View Post
    The thing is that if I install a fresh version, zenid is still there and there's still a "security error" when logging in to the adminfolder. I'm leaning towards thinking that one cannot have an IP address as http_server in configure.php.
    Often that is the case, yes.
    Quote Originally Posted by scrap View Post
    https://www.zen-cart.com/tutorials/i...hp?article=312
    "- you've set your site up on an IP address instead of a domain name, thus preventing session cookies from being set properly"

    I'm afraid that I was right... but now what? So I have to point my domain name prior to being able to check for installation and server issues?

    And what about that zenid thing? Is it the same cause?
    Yes, using a real domain name will prevent those problems.

    Surely the server has another domain name tied to it, right? even if it's one owned by the hosting company, which they use to identify the server for themselves? That name would work in place of the IP address.
    .

    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.

  9. #9
    Join Date
    Mar 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Moving to new server, IP in configure.php?

    Quote Originally Posted by DrByte View Post
    Often that is the case, yes.

    Yes, using a real domain name will prevent those problems.

    Surely the server has another domain name tied to it, right? even if it's one owned by the hosting company, which they use to identify the server for themselves? That name would work in place of the IP address.
    Christ i'm stupid, of course...

 

 

Similar Threads

  1. v139h PHP code showing on screen after moving to new server
    By 4jDesigns in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 12 Jun 2012, 11:31 AM
  2. server using $_ENV{DATABASE_SERVER} for configure.php database server
    By delia in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 27 Dec 2010, 03:46 PM
  3. Replies: 6
    Last Post: 27 Jun 2006, 01:25 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