Forums / Basic Configuration / How do you change the directory for zen?

How do you change the directory for zen?

Locked

Views: 7,016

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
2 Oct 2006, 11:44 PM
#1
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

How do you change the directory for zen?

Hello,

I am ready to go live with my store and my zen directory is under mydomain.com/store, but I want to just make it mydomain.com and not have it under a directory..

Where do I go to change this? Thanks

3 Oct 2006, 2:21 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do you change the directory for zen?

You would move all the ZenCart files that are in /your_shop_folder......to the root of your site.

then edit 2 configure.php files
/includes/configure.php
/admin/includes/configure.php

these files contain references to your current folder in the form /your_folder/

  define('DIR_WS_CATALOG', '/shop/');
  define('DIR_WS_HTTPS_CATALOG', '/shop/')

you correct all occurences that reference the folder removing the shop/ entries so in the above example you end up with

  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/')

Save these and replace the correct file to the reapective location.

Zen-Venom Get Bitten

3 Oct 2006, 9:07 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: How do you change the directory for zen?

There are a couple other things to address during your move.
They are documented here:
http://www.zen-cart.com/wiki/index.php/Server_Admin_-_Change_Folders

.
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 Oct 2006, 10:47 PM
#4
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: How do you change the directory for zen?

I changed the files but still it wont work, what am i doing wrong?!

Here is the old admin/includes file:

define('DIR_WS_ADMIN', '/cart/admin/');
define('DIR_WS_CATALOG', '/cart/');
define('DIR_WS_HTTPS_ADMIN', '/cart/admin/');
define('DIR_WS_HTTPS_CATALOG', '/cart/');

define('DIR_FS_ADMIN', '/home/sue/public_html/cart/admin/');
define('DIR_FS_CATALOG', '/home/sue/public_html/cart/');

define('DIR_FS_SQL_CACHE', '/home/sue/public_html/cart/cache');

to:

define('DIR_WS_ADMIN', 'admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', 'admin/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_ADMIN', '/home/sue/public_html/admin/');
define('DIR_FS_CATALOG', '/home/sue/public_html/');

define('DIR_FS_SQL_CACHE', '/home/sue/public_html/cache');

Here is the old includes/configure file:

define('DIR_WS_CATALOG', '/cart/');
define('DIR_WS_HTTPS_CATALOG', '/cart/');

define('DIR_FS_CATALOG', '/home/sue/public_html/cart/');

define('DIR_FS_SQL_CACHE', '/home/sue/public_html/cart/cache');

to:

define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_CATALOG', '/home/sue/public_html/');

define('DIR_FS_SQL_CACHE', '/home/sue/public_html/cache');

Then in the zen cart admin, i went to sesssions and changed it to:

/home/sue/public_html/cache

Is there anything else that I need to do in my ftp program or admin... I still have the cart folder, do I copy everything from there and paste in directory into the public_html folder????

4 Oct 2006, 12:22 AM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do you change the directory for zen?

I still have the cart folder, do I copy everything from there and paste in directory into the public_html folder???? Did you miss the first step??
You would move all the ZenCart files that are in /your_shop_folder......to the root of your site. And DrBytes refereence to: Change_Folders

So the answer is yes, you have to move/copy ALL the files.

Zen-Venom Get Bitten

4 Oct 2006, 1:59 AM
#6
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: How do you change the directory for zen?

ok, i did want you said and now i got this error:

Fatal error: Cannot instantiate non-existent class: phpbb in /home/sue/public_html/includes/autoload_func.php on line 79

how do i fix this? thanks for your help!

Also, i cant view the admin either...

4 Oct 2006, 2:24 AM
#7
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: How do you change the directory for zen?

ok, i fixed it where I can now see the admin area, but I cant view the catalog..

still shows this error:

Fatal error: Cannot instantiate non-existent class: phpbb in /home/sue/public_html/includes/autoload_func.php on line 79

4 Oct 2006, 3:31 AM
#8
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: How do you change the directory for zen?

do you have phpbb installed and configured n the zen cart configure files?

Zen cart PCI compliant Hosting

4 Oct 2006, 4:31 AM
#9
drbyte avatar

drbyte

Sensei

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

Re: How do you change the directory for zen?

do you have a file in your /includes/classes folder called class.phpbb.php ? or is it class.phpBB.php ? (with uppercase)? As of v1.3.5, it needs to be all-lower-case.

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

4 Oct 2006, 12:20 PM
#10
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: How do you change the directory for zen?

I am not at home to check to check it, but I dont believe I had phpbb enabled and I have not done anything differently besides moving the files to the home directory.

Where do I go to see if I had phpbb enabled? I know that in the zen admin I believe under configuration and my store , where it says "enable phpbb linkage" that it says "false".... is this what you are referring too?

Or, maybe this is something that I did not do right in the includes/configure, admin/includes files?

I appreciate all the help and need to get this site up today... help!

4 Oct 2006, 9:56 PM
#11
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: How do you change the directory for zen?

It worked! I had the includes/classes/phpBB.php and rename it to all lower case and it worked!! THANK YOU!

8 Apr 2007, 4:54 AM
#12
markov avatar

markov

New Zenner

Join Date:
Sep 2006
Posts:
32
Plugin Contributions:
0

Re: How do you change the directory for zen?

Hi there,
Can anyone help me on this one. I currently have a working zencart in a sub-directory called shop/

The Client now wants the site moved to the root. I have followed this thread step by step and I have also got to the following fatal error page
"Fatal error: Cannot instantiate non-existent class: notifier in /home2/ins58917/public_html/includes/autoload_func.php on line **79"

**But in my case the file in includes>classes> called 'class.phpbb.php' is correct and in lowercase.

You can see this error by going to http://www.instyleseating.com.au/

and you can see the site running correctly in http://www.instyleseating.com.au/shop/

Obviously, in my case, I made a copy of my 'shop" files and then copied them all to the root - just in case I made a mistake and still needed my working 'shop' doirectory -which I do.

Can anyone help me here and shed any light on what I may have done incorrectly?

Thanks
Markov

8 Apr 2007, 4:57 AM
#13
drbyte avatar

drbyte

Sensei

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

Re: How do you change the directory for zen?

See kobra's post (#2) and my post (#3) above for details.
Your configure.php appears to be pointing to the wrong place.

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

8 Apr 2007, 5:08 AM
#14
markov avatar

markov

New Zenner

Join Date:
Sep 2006
Posts:
32
Plugin Contributions:
0

Re: How do you change the directory for zen?

Hi DrByte, Thanks for the quick reply.
Here are my configs files

includes/configure.php ..................

define('HTTP_SERVER', 'http://www.instyleseating.com.au');
define('HTTPS_SERVER', 'https://www.instyleseating.com.au');

define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_CATALOG', '/home2/ins58917/public_html');

define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home2/ins58917/public_html/cache');

admin/includes/configure.php ..................

define('HTTP_SERVER', 'http://www.instyleseating.com.au');
define('HTTPS_SERVER', 'https://www.instyleseating.com.au');
define('HTTP_CATALOG_SERVER', 'http://www.instyleseating.com.au');
define('HTTPS_CATALOG_SERVER', 'https://www.instyleseating.com.au');

define('DIR_WS_ADMIN', 'admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', 'admin/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_ADMIN', '/home2/ins58917/public_html/admin/');
define('DIR_FS_CATALOG', '/home2/ins58917/public_html');

define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home2/ins58917/public_html/cache');

Are these incorrect?

Thanks

8 Apr 2007, 5:22 AM
#15
drbyte avatar

drbyte

Sensei

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

Re: How do you change the directory for zen?

These should start and end with a /, not just end with one:```
define('DIR_WS_ADMIN', 'admin/');
define('DIR_WS_HTTPS_ADMIN', 'admin/');

As for configure.php files, you can simply follow the pattern in the dist-configure.php files.

But that's not the real problem.

If it cannot process classes properly, then it's not able to load the class files from /includes/classes.  Thus, you have either missed copying files or you've introduced a permissions problem.


I always "move" the folder, rather than copy it and ending up with duplicates and uncertainties of whether things are loading from the right place or not.  But that's just me.

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

8 Apr 2007, 6:36 AM
#16
markov avatar

markov

New Zenner

Join Date:
Sep 2006
Posts:
32
Plugin Contributions:
0

Re: How do you change the directory for zen?

Thanks Dr Byte,
I have changes to /admin/ etc.
I am embarassed to say I had the wrong password on the database.

Working at last. Thanks for your help - much appreciated.

8 Apr 2007, 11:37 PM
#17
markov avatar

markov

New Zenner

Join Date:
Sep 2006
Posts:
32
Plugin Contributions:
0

Re: How do you change the directory for zen?

Hi Dr Byte or Whoever wants to reply to this - can anyone point me in a definitive explanation of directory structures.
i.e. I often get confused when I should use a forward slash - or when I shouldn't.

Thus what does /admin/ mean as opposed to 'admin/'? I have often had problems in these areas - another example would be when I want to go to the root of a directory whilst I am in a sub-directory.
For example - I kind of know that ../mydirectory takes me down one directory (i think?) - so lets say I was 2 directories down and I wanted to go to the root - would that be ../../mydirectory? Or is there a quicker way? And can these .. be used in php coding?

I think you can see from example here that I am a bit dusty with all this. Any guidance would be good here.

15 Jul 2007, 5:19 PM
#18
marcap avatar

marcap

Zen Follower

Join Date:
Mar 2007
Posts:
106
Plugin Contributions:
0

Re: How do you change the directory for zen?

Hello
I copied all the files in the root and did all the changes I needed in the configure.php files
No problem with ADMIN but I cannot see the CATALOG

Here is my include/config file

define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_CATALOG', '/home/httpd/vhosts/mysite.com/httpdocs/');

define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/httpd/vhosts/mysite.com/httpdocs/cache');

I used my server to do the site and everything is fine, now my client want it on his server and I got this problem.

Any help please?
Thanks

15 Jul 2007, 5:38 PM
#19
drbyte avatar

drbyte

Sensei

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

Re: How do you change the directory for zen?

marcap:

I used my server to do the site and everything is fine, now my client want it on his server and I got this problem.http://www.zen-cart.com/wiki/index.php/Server_Admin_-_Switch_Servers

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

15 Jul 2007, 8:42 PM
#20
marcap avatar

marcap

Zen Follower

Join Date:
Mar 2007
Posts:
106
Plugin Contributions:
0

Re: How do you change the directory for zen?

DrByte:

http://www.zen-cart.com/wiki/index.php/Server_Admin_-_Switch_Servers

Hello and thank u for your answer
I saw that page and it is what I did.
For everything OK on my server I meant that when I tryed to take off "zen-cart" from the URL everything was fine but not on this new server.

I can't even run the Fix Cache Key Utility, maybe a matter of permissions on the client server? 'cause I had already some kind of restrictions.

What I don't understand is that I had no problems with the ADMIN (mysite.com/admin) but with the catalog yes.

thanks again
Mario