Forums / Installing on a Linux/Unix Server / renaming directory folder

renaming directory folder

Results 1 to 20 of 36
16 Feb 2014, 15:40
#1
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

renaming directory folder

I apologize up front for how dumb this question is; I'm not brand new but I don't know much at all! (I do know I need to upgrade, but first things first.)

I have read and understand the tutorial ""I have installed ZC to a directory. How do I rename or move that directory?". I think I can do this once my question is resolved. Here goes:

My webhost says the landing page must be named index.xxx
Webhost is Lunarpages, Linux servers.
The top hierarchy is: /public_html/

Currently, the website's (www.dancingtothespiritofthewood.com) landing page is a home page (named index.htm) which has a link to http://www.dancingtothespiritofthewood.com/webstore which opens up the zen cart store. Works great.

I have to get rid of the website pages which are NOT a part of the webstore, and I want the site to open to the zencart home page when the url "http://www.mydomain.com" is typed into the browser.

The tutorial says to create a new folder name. It seems to me that if I follow the steps in the tutorial to create a folder in which to hold the zencart documents my webhost will not recognize the folder unless it's named index.xxx.

The current folder is named webstore.

What do I name the new folder? Or do I take the index.php document (currently in webstore/includes/languages/english and move it out of the folder named webstore and onto the server? (I'm pretty sure this would create a small disaster!)

I don't want to experiment if there's a simple (or even not so simple)answer. Thanks for your patience!
16 Feb 2014, 15:53
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: renaming directory folder

If this is a new site and you just installed it, why are you using a buggy, insecure and other horrible thoughts, Zen Cart v1.3.8a on your site? :blink:
16 Feb 2014, 18:24
#3
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Posts:
1,732
Plugin Contributions:
11

Re: renaming directory folder

1 - In your host cPanel, are there any domain forwards?

2 - What domain/folder is your configure.php pointing at for Zen Cart?
16 Feb 2014, 20:28
#4
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

Thank you for your input.

As far as I can tell (remember, I don't know much) there are no domain forwards. I checked cPanel—no redirects, no subdomains.

configure.php is here:

/public_html/webstore/includes/configure.php

(Or at least that seems to be the hierarchy).
16 Feb 2014, 20:32
#5
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Posts:
1,732
Plugin Contributions:
11

Re: renaming directory folder

bluelion:

Thank you for your input.

As far as I can tell (remember, I don't know much) there are no domain forwards. I checked cPanel—no redirects, no subdomains.

configure.php is here:

/public_html/webstore/includes/configure.php

(Or at least that seems to be the hierarchy).


Open configure.php, does it direct the store/admin 'CATALOG' to the root or the sub directory?
16 Feb 2014, 20:38
#6
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

it says:

define('DIR_FS_CATALOG', '/home/danci18/public_html/webstore/');
17 Feb 2014, 14:56
#7
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

bluelion:

it says:

define('DIR_FS_CATALOG', '/home/danci18/public_html/webstore/');


I've been reading lots of forum posts. Would the following work?

Remove all the zencart docs and folders from the primary "webstore" folder so the directory would be /public_html/... (all the documents contained in the current webstore folder)?

In other words, since my host says I have to have index.xxx at the "top level" under /public_html/ for the URL to work, do all the files and folders for zencart have to be in a separate folder named (in this case) webstore, or can they be taken out of the "top level" folder?
17 Feb 2014, 15:11
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Posts:
19,793
Plugin Contributions:
2

Re: renaming directory folder

You're making thei harder than it needs to be, I think.

Move all the folders and files from the /webstore directory to the root (public_html) directory.

Remove the index.html file from the public_html folder.

Edit the two configure.php Zencart files to remove all mention of /webstore (so the define above will be: define('DIR_FS_CATALOG', '/home/danci18/public_html/'); - (there are also other places to remove the /webstore part).

Done. Zencart uses index.php in the root to start your store.
17 Feb 2014, 15:25
#9
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

Thanks so much. I'll give it a try and let you know the results. I really appreciate this--can't try it right now but will do so later on today. Thanks again.
23 Feb 2014, 14:25
#10
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

Still not working...

I've been working on this on and off and followed your directions. I did get everything out of webstore folder, reset the configure.php in includes and admin, but when I go to the site the text has loaded but none of the images.

I reset sessions in the admin session directory as well. Anything I try to do out of admin takes me to a error page which shows this: The requested URL /webstore/xxxx/admin.php was not found on this server.

where xxxx is the renamed admin folder. So there is still some setting that says webstore, right?

HELP!!!!!
23 Feb 2014, 16:23
#11
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

bluelion:

Still not working...

I've been working on this on and off and followed your directions. I did get everything out of webstore folder, reset the configure.php in includes and admin, but when I go to the site the text has loaded but none of the images.

I reset sessions in the admin session directory as well. Anything I try to do out of admin takes me to a error page which shows this: The requested URL /webstore/xxxx/admin.php was not found on this server.

where xxxx is the renamed admin folder. So there is still some setting that says webstore, right?

HELP!!!!!


MORE INFO AND UPDATE

I found a couple of lines of code with /webstore/ that I had failed to change. But the site still does not load images. www.dancingtothespiritofthewood.com

--when I updated the code for the directories (for such things as DIR_WS_CATALOG) I used the entire path (home/danci18/public_html) instead of just public_html. In some places there was previously just /webstore/ and in some the entire path.

--I changed includes/configure.php and xxxx (new admin)/includes/configure.php.

--In Admin Configuration Sessions, I changed it to /home/danci18/public_html/cache. I can't change it back now--it still takes me to error message "The requested URL /home/danci18/public_html/ha5Ly2/configuration.php was not found on this server."


--to deal with hacking issues from several years ago, I created a new admin folder with xxxx (not the real name) for its name. There is still a folder named Admin which has the following folders in it: includes, classes, functions, and modules. Under the old directory hierarchy (/webstore/) everything was working fine, so I don't think I need to delete it, but should I move those files into the xxxx (new admin) folder?

Thanks so much for any and all help.
23 Feb 2014, 16:27
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: renaming directory folder

It appears to me that your configure.php is not setup correctly ...

Could you post your file, from the server, for:
/includes/configure.php

without your username and password ...
23 Feb 2014, 17:02
#13
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

I'm not sure how to post it (?)-- here's a copy/paste

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
define('HTTP_SERVER', 'http://dancingtothespiritofthewood.com');
define('HTTPS_SERVER', 'https://dancingtothespiritofthewood.com');

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/home/danci18/public_html/');
define('DIR_WS_HTTPS_CATALOG', '/home/danci18/public_html/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/danci18/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '*****');
define('DB_SERVER_PASSWORD', '*****');
define('DB_DATABASE', '****');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'database');
define('DIR_FS_SQL_CACHE', '/home/danci18/public_html/cache');

// EOF
23 Feb 2014, 17:08
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: renaming directory folder

NOTE: the idea was NOT to show your content sensative data ... I have removed it from your post ...

Let's start by getting this file corrected ...

Change these two:
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');


See what that does for a start ...
23 Feb 2014, 17:17
#15
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

The images are there. I'm stunned and ecstatic. I can't begin to thank you enough.
Do I change the same files in the admin/includes/config.php?
23 Feb 2014, 17:37
#16
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

In checking out things (please know how pleased and relieved I am that the website is functioning again) I find I cannot access admin. I get the following error page:
The requested URL /home/danci18/public_html/xxxx/login.php was not found on this server.


(xxxx is the renamed admin folder).
23 Feb 2014, 17:38
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: renaming directory folder

I do not know what you have in your file, on the server, for:
/yoursecretadmin/includes/configure.php

You could post it, WITHOUT, the username and password ...

NOTE: You seriously need to upgrade to a better version of Zen Cart than that buggy, insecure, non-safe, feature lacking and potentially accident waiting to happen v1.3.8 ...
23 Feb 2014, 17:45
#18
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

I'll try to post without risking security issues:



// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/home/danci18/public_html/secret admin/');
define('DIR_WS_CATALOG', '/home/danci18/public_html/');
define('DIR_WS_HTTPS_ADMIN', '/home/danci18/public_html/secret admin/');
define('DIR_WS_HTTPS_CATALOG', '/home/danci18/public_html/');

AND

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


[NOTE: I inherited this site and will upgrade to the latest version as soon as possible. I do understand that this version is NOT a good version. I needed to fix some things for the store owner as soon as possible, and I'm very concerned about doing the update as there are several issues in the current site which will make that difficult--i.e., the template files are not designated as to customized, or original and I don't know (yet) what plugins, etc. have been added.] Plus, as you can tell, I am certain I don't know enough to do the upgrade "seamlessly".
23 Feb 2014, 17:52
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: renaming directory folder

I am not sure of all the settings, but from what you are showing:
define('DIR_WS_ADMIN', '/secret admin/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', '/secret admin/');
  define('DIR_WS_HTTPS_CATALOG', '/');
23 Feb 2014, 17:59
#20
bluelion avatar

bluelion

New Zenner

Join Date:
Mar 2008
Posts:
73
Plugin Contributions:
0

Re: renaming directory folder

I changed those settings. I can now get to the admin log in page, but when logging in, it gives me the following error message:
The requested URL /home/danci18/public_html/secret admin/login.php was not found on this server

When I stated to work on the redirect this morning, I changed the setting in Admin Configure Sessions to:
/home/danci18/public_html/cache (I believe /cache was the ending--since I can't access it now, I don't know for sure).

Since I can't access the Sessions panel, I can't change it.

Sorry to be so illiterate in these things--I'm willing to learn!