Zen Cart Logo
Forums / Installing on a Linux/Unix Server / I need a tutorial on the forward slash.

I need a tutorial on the forward slash.

Views: 1,561

Results 1 to 12 of 12
12 Nov 2011, 2:11 AM
#1
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

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.

12 Nov 2011, 3:55 AM
#2
fairestcape avatar

fairestcape

Totally Zenned

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

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?

12 Nov 2011, 4:43 AM
#3
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

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.

12 Nov 2011, 4:49 AM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town &amp; London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: I need a tutorial on the forward slash.

joejoejoe:

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

12 Nov 2011, 4:53 AM
#5
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

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/index.php?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!
:wink:

12 Nov 2011, 4:55 AM
#6
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

Re: I need a tutorial on the forward slash.

fairestcape:

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.

12 Nov 2011, 5:09 AM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: I need a tutorial on the forward slash.

joejoejoe:

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:

  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
12 Nov 2011, 10:25 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: I need a tutorial on the forward slash.

joejoejoe:

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.

joejoejoe:

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.

12 Nov 2011, 1:04 PM
#9
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

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.

12 Nov 2011, 1:31 PM
#10
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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.

10 Dec 2011, 8:16 AM
#11
fever avatar

fever

New Zenner

Join Date:
Jun 2010
Posts:
7
Plugin Contributions:
0

Re: I need a tutorial on the forward slash.

I had the same problem, I used the installatron applications installer provided by my host. If you install Zencart into the root folder of your website, this is what happens.

I have had to login to the shell to chmod 711 the configure.php file before i could re-upload the fixed version.

This has been costing me good google search results!! Finally fixed after 2 years....

10 Dec 2011, 4:12 PM
#12
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: I need a tutorial on the forward slash.

Fever:

I used the installatron applications installer provided by my host.

You would get a more refined installation using an Oshkosh front-end-loader.