Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default I need a tutorial on the forward slash.

    I've moved twice in two weeks. My store works, the old store worked, but I was just comparing the two /includes configure files with winmerge and I noticed some discrepancies. Both stores are installed in the root folder.

    On my old store the HTTP_SERVER is http://www.mydomain.com/

    On the current install it is http://www.mydomain.com

    And the old store had DIR_WS_CATALOG', '')
    But the new store has DIR_WS_CATALOG', '/')

    The comments above the catalog lines say to leave the forward slash, so I assume that is correct. Since both stores worked - am I right in assuming the slash at the end of the HTTP_SERVER doesn't matter?

    I'm using 1.3.9h.

  2. #2
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: I need a tutorial on the forward slash.

    It matters A LOT...

    It's the key separator between the auto-generated <base href> and all subsequent resources and elements.

    I am sure you understand how the PATH system operates on a computer?

  3. #3
    Join Date
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default Re: I need a tutorial on the forward slash.

    Yes at a basic level I do understand a path. You start throwing around terms like <base href> and no I don't.
    The new store works. I can search it online and have received orders.
    The old store worked. I could search it online and received orders.

    Both were installed at root. Both at mydomain.com

    All I did was move hosts.

    I only noticed the difference because I was playing with winmerge and wanted to see what all I changed when I moved.

    But if it matters A LOT, in red no less, then one store should have been broken. Perhaps in moving hosts I crossed into the Twilight Zone?

    Wise man says: Questions answered with questions lead to mere puzzlement. I shall continue my path for zen enlightenment via other channels.

  4. #4
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: I need a tutorial on the forward slash.

    Quote Originally Posted by joejoejoe View Post
    I shall continue my path for zen enlightenment via other channels.
    Well... you are in the right place for zen enlightenment, but we cannot be expected to teach the raw basics of website building.

    These subjects (as they are universal to ALL websites, not just ZC) are taught in literally thousands of online tutorials, forums, blogs...

    So there is no need to replicate any of it here.

    If you need to find out what <base href> does, go where I went to about 9 years ago...

    And while you are there, take a look at much of the other stuff...

  5. #5
    Join Date
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default Re: I need a tutorial on the forward slash.

    Replying to my own reply. That is, I know, so rude. But I am who I am.

    Examining the tutorial:
    https://www.zen-cart.com/tutorials/i...hp?article=408

    I see that both old and new, regardless if they are wrong or right, will produce the same result.

    HTTP_SERVER + CATALOG = ENLIGHTENMENT
    The old store:
    mydomain.com/ + ' ' = mydomain.com/

    The new store:
    mydomain.com + '/' = mydomain.com/

    Thanks Joe!
    You are quite welcome Joe!

  6. #6
    Join Date
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default Re: I need a tutorial on the forward slash.

    Quote Originally Posted by fairestcape View Post
    Well... you are in the right place for zen enlightenment, but we cannot be expected to teach the raw basics of website building.

    These subjects (as they are universal to ALL websites, not just ZC) are taught in literally thousands of online tutorials, forums, blogs...

    So there is no need to replicate any of it here.

    If you need to find out what <base href> does, go where I went to about 9 years ago...

    And while you are there, take a look at much of the other stuff...
    Sorry but I typed my reply while you were typing yours. Just wanted to let you know I didn't ignore it, it's just that it wasn't there when I asked. And the tutorial I found explained it clearly to me. Thanks.

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

    Default Re: I need a tutorial on the forward slash.

    Quote Originally Posted by joejoejoe View Post

    I see that both old and new, regardless if they are wrong or right, will produce the same result.

    HTTP_SERVER + CATALOG = ENLIGHTENMENT
    The old store:
    mydomain.com/ + ' ' = mydomain.com/
    Except that this was never "the old"... Whoever set this up for you "doctored" the line, because in all my 7 years working with ZC (back to ver 1.2.5) it has always been:

    PHP Code:
      define('DIR_WS_CATALOG''/');
      
    define('DIR_WS_HTTPS_CATALOG''/'); 
    20 years a Zencart User

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

    Default Re: I need a tutorial on the forward slash.

    Quote Originally Posted by joejoejoe View Post
    The comments above the catalog lines say to leave the forward slash, so I assume that is correct. Since both stores worked - am I right in assuming the slash at the end of the HTTP_SERVER doesn't matter?
    The CORRECT and SAFEST way is to use what zc_install produces for you when you install Zen Cart.
    It's also the EASIEST way. Even when changing servers (since the first step in changing servers is to do a clean install on the new server, which results in producing the correct configure.php file contents for that server. THAT IS WHY that's the first step in the instructions.

    Quote Originally Posted by joejoejoe View Post
    Replying to my own reply. That is, I know, so rude. But I am who I am.
    Actually, no, it's not rude. In fact it's encouraged. If you have information to add, add it. If you find nobody replying then it's probably due to insufficient detail, and so replying to your own thread and giving more detail is the best step.
    .

    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
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default Re: I need a tutorial on the forward slash.

    Agreed that the correct way is to let ZC write the file. But I think what happened to my previous configure file, and I'm not alone, is that when I installed it I was on my "temporary url" with a host who turned out to also be temporary. When I got the domain straightened out I was forced to go in and change lines to reflect the correct urls because instead of seeing mydomain.com in the url, customers and the spiders were seeing mytemporaryurl.com and that wasn't cool. There are plenty of times where the install doesn't end up exactly where it's wanted and needs fixed.

    Another instance where store owners would need to mess with the file would be for those who installed their store in a subfolder and now want to move it up to the root folder - which must happen a lot because there are mutliple threads and tutorials on it. And if you don't know 100% what you are doing, but are just following whatever tutorial or thread you pulled up to help you along, then it's very to see: define('DIR_WS_CATALOG', '/store') and instead of deleting store you delete /store.

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

    Default Re: I need a tutorial on the forward slash.

    Additionally, some basic understanding of a PHP define statement is necessary. Armed with this (very basic) level of PHP knowledge, you would know that the position of any variable ( in this case the / ) in a PHP define, must reside within the two single quotes that come after the define's CONSTANT.

    Of course one does not expect everyone to have the same level(s) of knowledge as others, so this is in no way a criticism of your particular levels of skill... In fact, this whole thread is exactly what the learning process is all about, and the really good thing coming out of it is that you know a bit more than you did a couple of days ago.

    So, I trust you do not see our interventions here as criticism... On the contrary, we are only too pleased to be able to give appropriate advice.

    Others will learn from this thread too, so there are many benefits to posting a problem, getting it resolved, and having the "courage" to articulate everything in a public forum.
    20 years a Zencart User

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Question after following the Custom Sidebox Tutorial in the wiki
    By bobmeetin in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 29 Apr 2013, 02:32 PM
  2. v139f Installed SiteMap XML on v1.3.9f - Site Map URL is missing the trailing slash
    By ohob in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 19 Jun 2012, 02:41 AM
  3. Extra Forward Slash Before Links...
    By gaffettape in forum General Questions
    Replies: 5
    Last Post: 21 Aug 2010, 02:58 PM
  4. Is the Wiki Dev/API tutorial the best way to learn Zencart structure ?
    By DogTags in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 23 Dec 2009, 03:59 PM
  5. extra forward slash in url
    By urbanfarmer in forum General Questions
    Replies: 3
    Last Post: 16 Oct 2009, 03:50 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