Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Mar 2008
    Location
    Ontario
    Posts
    39
    Plugin Contributions
    0

    Default Starts with wrong domain host name

    I have a Zen Cart install v138a which starts up with a domain host name other than the one specified in config.php define HTTP_SERVER. Is that supposed to happen?

    I don't think php could check the url. Is there javascript that is supposed to check that?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Starts with wrong domain host name

    It's not very clear what you mean.

    In principle your configure.php file will contain the domain name you gave it when you installed or whatever you have since edited it to.

    If you have multiple domains in your hosting account and have pointed more than one to the folder where your Zen Cart is installed, then they will all start your store.

    I'm not sure what you mean by having javascript check for this, but since javascript runs in a visitors browser, there's not a lot that it can do about your server configuration.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Mar 2008
    Location
    Ontario
    Posts
    39
    Plugin Contributions
    0

    Default Re: Starts with wrong domain host name

    A little bit of js could derail the page if the url was unexpected.

    No big deal. You can't check everything. Just one of those things to look out for, I guess.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Starts with wrong domain host name

    I'm not sure I would just let that go.

    Is it possible your site has been hacked?

    What exactly do you mean by 'starts up'? A completely different domain name appears in your address bar, then switches to the proper one? If so, have you looked at any .htaccess files and double-checked your configure.php files?

  5. #5
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Starts with wrong domain host name

    The site URL could help us to give better advice.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  6. #6
    Join Date
    Mar 2008
    Location
    Ontario
    Posts
    39
    Plugin Contributions
    0

    Default Re: Starts with wrong domain host name

    I reinstalled my LAMP on my local winxp but I dont see anything in the ZenCart code that would make Linux act any different.

    In Apache you set the web dir whether its single or vhosts.

    In your hosts file you define the hosts/domain name the web server will respond to.

    You type the url into the browser and ZenCart php will start.

    Ok, php can get the host name from the environment var SERVER_NAME. It should be comparing that with define HTTP_SERVER.

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Starts with wrong domain host name

    OK ... but it's still not obvious to those of us who can't see your screen what the problem is, making it difficult to give any advice or help.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Mar 2008
    Location
    Ontario
    Posts
    39
    Plugin Contributions
    0

    Default Re: Starts with wrong domain host name

    If youve configured vhosts in Apache and you know some php youll know what I'm talking about.

    When ZenCart starts up it does a lot of checks on the defines in the configure.php. If theres a problem, it throws up the Install ZenCart page or something like that.

    Looking at a web page isn't going to help you. You need to trace the code.

    When I get my debugger configured, I'll tell ya where.

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Starts with wrong domain host name

    Quote Originally Posted by meshgraphics View Post
    If youve configured vhosts in Apache and you know some php youll know what I'm talking about.
    I have. I do. But that doesn't make any clearer the problem you're asking about.

    I'm sure that it's very obvious to you as you observe the behaviour, but to those of us who can't see it, your explanation is very vague and ambiguous.

    But hey, I can think of better ways to spend my weekend than keep saying that, so I'm out of here.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  10. #10
    Join Date
    Mar 2008
    Location
    Ontario
    Posts
    39
    Plugin Contributions
    0

    Default Re: Starts with wrong domain host name

    For those of you who dont know:

    Apache Web Server has had the ability to host several domain name/hosts on a single web server for quite a while. This is accomplished through the vhosts configuration in the http.conf file.
    Every domain configured on the server has a config section in the Virtual Hosts area. A minimum config would require
    Code:
    ServerName mysite.com
        DocumentRoot /home/user1/html_default
    ServerName mysite22.com
        DocumentRoot /home/user22/html_default
    When a browser asks the web server for http://mysite.com
    it will run index.php at /home/user1/html_default.

    If by mistake you had the same DocumentRoot for both websites, asking for either website would start the same index.php.

    In fact, this may be what you want. If you want multiple domain names starting up the same site, this is what you would do.

    Ok, lets suppose Zen Cart is going to check the servername after the php starts up. Apparently, is doesnt do that.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Changing domain to another name within same host
    By jackryan in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 3 Dec 2009, 04:52 PM
  2. Wouldn't install on my paid domain name - shop works but wrong URLs
    By ningyotan in forum Installing on a Windows Server
    Replies: 7
    Last Post: 14 Nov 2009, 04:24 AM
  3. Replies: 3
    Last Post: 20 Mar 2009, 06:11 AM
  4. moving zen cart to a virtual host with no domain
    By Capslock118 in forum General Questions
    Replies: 4
    Last Post: 26 Jun 2007, 09:48 PM

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