Forums / General Questions / Moving site from sub directory errors

Moving site from sub directory errors

Views: 2,484

Results 1 to 20 of 24
15 Apr 2012, 8:35 AM
#1
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Moving site from sub directory errors

Hello,
I have finally finished my site and used the info here.. www.zen-cart.com/tutorials/index.php?article=122 to transfer it over. The admin login side of things looks fine, however, the site looks like this... craftjam.co.uk. Does anyone know what I have done wrong?

Thanks
A

15 Apr 2012, 8:37 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Moving site from sub directory errors

Check to see that everything is correct in your configure.php file.

20 years a Zencart User

15 Apr 2012, 9:37 AM
#3
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

Here is my cunfigure.php file. I was originally in a folder called /directory/ so when I moved it all to the root, I deleted this part only from the 4 parts it was in. Two of them just had /directory/ with no extention after it so I changed those two to /public_html/

I have highlighted them in red below.

Is this the problem? Have I put the wrong thing here, I wondered if it should be something like /index. I really have no clue!

/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. /
/
**** The 2 files should be kept separate and not used to overwrite each other. ***********/

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define('HTTP_SERVER', 'http://craftjam.co.uk');
define('HTTPS_SERVER', 'https://craftjam.co.uk');

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

// 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', '/public_html');
define('DIR_WS_HTTPS_CATALOG', '/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/craftja1/public_html');

(taken code out here, the following if the 4th one it tells you to change)

// 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', 'none');
define('DIR_FS_SQL_CACHE', '/home/craftja1/public_html/cache');

Thanks
A

15 Apr 2012, 9:52 AM
#4
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

When I had my original dreamweaver site up, i was told by my host that the front page needs to be called index.html. When i click the links on my site now, it still seems to be looking for index.html. maybe theres something I need to change there. I have asked them for help but they say they can't help with 3rd party app's

A

15 Apr 2012, 10:05 AM
#5
fairestcape avatar

fairestcape

Totally Zenned

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

Re: Moving site from sub directory errors

rainbow_pixie_star:

When I had my original dreamweaver site up, i was told by my host that the front page needs to be called index.html. When i click the links on my site now, it still seems to be looking for index.html. maybe theres something I need to change there. I have asked them for help but they say they can't help with 3rd party app's

A

If you have index.html in your ROOT folder, rename it to index-html.SUSP

OTHER folders in zencart will have their own index.html files (DO NOT rename these, or mess with them).

Your host is a pratt. If you were hosting with a GOOD company - one that KNOWS zencart, they would probably assist you (maybe even for free).

Zencart does NOT operate off flat "HTML". It operates off PHP.

Forget all you know about Dreamweaver. Put it back in its box and leave it there. It is of no use to you.

While Dreamweaver can be used to develop php platforms, you need to be an expert in php before you jump into that pond. This thread does not indicate that you are such an expert.

15 Apr 2012, 10:11 AM
#6
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

I have index.php thats all.

Some of the guys on my host are really good, but i guess this one was following the rules or couldn't be bothered :frusty::frusty::frusty::frusty::frusty::frusty::frusty:

15 Apr 2012, 10:13 AM
#7
fairestcape avatar

fairestcape

Totally Zenned

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

Re: Moving site from sub directory errors

Tell me if I am right:

Before you decided a webshop might be nice, you built a HTML site using dreamweaver on your domain.

Then you installed zencart in a sub-directory.

Then you decided to move zencart to the ROOT directory to become your main website.

You did not delete/disable the original dreamweaver site. so you still have that operational, with its index.html file in the root folder.

Just RE-NAME that index.html file to index-html.SUSP and the broweers will then operate by finding znecart's index.php file.

15 Apr 2012, 10:27 AM
#8
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

Tell me if I am right:

Before you decided a webshop might be nice, you built a HTML site using dreamweaver on your domain. YES

Then you installed zencart in a sub-directory. YES

Then you decided to move zencart to the ROOT directory to become your main website. YES

You did not delete/disable the original dreamweaver site. so you still have that operational, with its index.html file in the root folder. I did delete all my old site off my root directory before transfering zencart, but I must have missed something but not sure what? I cannot see an index.html file there but there is an index.php

Just RE-NAME that index.html file to index-html.SUSP and the broweers will then operate by finding znecart's index.php file.

No index.php to rename, when I go onto my site there are just links, and click a link it says... The requested URL /public_html/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

15 Apr 2012, 10:33 AM
#9
scrap avatar

scrap

Zen Follower

Join Date:
Mar 2009
Posts:
103
Plugin Contributions:
0

Re: Moving site from sub directory errors

rainbow_pixie_star:

Here is my cunfigure.php file.

Change the red parts to these red parts and try again

// 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', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
15 Apr 2012, 10:49 AM
#10
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

Hi,
Tried that and it didnt work.
However, I have just realised I wasn't in the root I was in...
ftp://[email protected]/public_html/

I tried moving it all to the very root of
ftp://[email protected]/ and it didn't like that either

I know I will be something completely stupid that I haven't realised I have done!

15 Apr 2012, 11:44 AM
#11
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

Is there something I can show you so you would be able to see what I have done wrong. Maybe I have put it all in the wrong place? changed the files wrong?

Thankyou
A

15 Apr 2012, 12:02 PM
#12
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Moving site from sub directory errors

Your problems are not related to zencart. What are you doing in the FTP folder?

You need to learn how to manage your hosting environment, and that's not something that gets taught here.

20 years a Zencart User

15 Apr 2012, 12:13 PM
#13
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

I have nothing in public_ftp, just an incoming folder.
Do you think it will be best to back it all up and re upload it all? If so I would need to know for sure that all the zencart products and settings are backed up, however, if I do that, my configure files would need to be different wouldn't they.

I would probably never have started this if I realised it wouldn't be straight forward.

Really dont know what to do. would someone be able to go in there and look around?

15 Apr 2012, 12:39 PM
#14
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

Hi,
I have posted both configure.php files so you can see them...

<?php /** * @package Configuration Settings circa 1.5.0 * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * File Built by zc_install on 2012-03-02 09:19:57 */ /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com define('HTTP_SERVER', 'http://craftjam.co.uk'); define('HTTPS_SERVER', 'https://craftjam.co.uk'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', 'false'); // 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', '/public_html'); define('DIR_WS_HTTPS_CATALOG', '/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/craftja1/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_CHARSET', 'latin1'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); // 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', 'none'); define('DIR_FS_SQL_CACHE', '/home/craftja1/public_html/cache'); // EOF This is the admin one... <?php /** * @package Configuration Settings circa 1.5.0 * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * File Built by zc_install on 2012-03-02 09:19:57 */ /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ /** * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN: * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries: */ define('HTTP_SERVER', 'http://craftjam.co.uk'); define('HTTPS_SERVER', 'https://craftjam.co.uk'); define('HTTP_CATALOG_SERVER', 'http://craftjam.co.uk'); define('HTTPS_CATALOG_SERVER', 'https://craftjam.co.uk'); // secure webserver for admin? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_ADMIN', 'false'); // secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_CATALOG', 'false'); // 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) $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path']; define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_CATALOG', '/public_html'); define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_HTTPS_CATALOG', '/public_html'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); 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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * DIR_FS_* = Filesystem directories (local/physical) define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/'); //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/craftja1/public_html'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_CHARSET', 'latin1'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); // 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', 'none'); define('DIR_FS_SQL_CACHE', '/home/craftja1/public_html/cache'); // Define the webserver and path parameters // Main webserver: eg-http://www.your_domain.com - // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com /* * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings */ // EOF
15 Apr 2012, 1:01 PM
#15
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

I now have no admin since i have re uploaded these files after checking them

15 Apr 2012, 1:20 PM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Moving site from sub directory errors

rainbow_pixie_star:

// * 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', '/public_html');
define('DIR_WS_HTTPS_CATALOG', '/public_html');

Unless your folder structure looks like
/public_html/public_html/ then these entries are wrong.
Change them to
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

Needs to be done in both config files

At a glance, everything else look OK.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

15 Apr 2012, 1:25 PM
#17
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Moving site from sub directory errors

rainbow_pixie_star:

I now have no admin since i have re uploaded these files after checking them

Did you re-upload to the folder called 'admin' or the renamed admin?

What is the error message you are getting?

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

15 Apr 2012, 1:54 PM
#18
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

I have changed the con fig files (2 posts back)
As for the last post I have re uploaded the admin but the admil login page is missing when I go to it in my browser.

I am completely lost here!

15 Apr 2012, 2:08 PM
#19
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Moving site from sub directory errors

rainbow_pixie_star:

I have changed the con fig files (2 posts back)
As for the last post I have re uploaded the admin but the admil login page is missing when I go to it in my browser.

I am completely lost here!

Me too now. I'm not sure if 'admil' is a typo, or the name of your admin folder.

If the login page is 'missing' it generally means that your files have been uploaded to a different folder than the one you are using to trying to connect too.

EG, if your admin folder is called "myadmin" then the admin files will need to be located in this folder (and not one called 'admin') and the URL to connect to will also have the same name, eg, http://mystore.com/myadmin/

In other words, these must all be consistant.

Also, exact error messages may help... it is surprising the number of people that mis-read these and proclaim the page is 'missing' when the error clearly states something different, such as 'permission denied' and even 'server error'. Needless to say, the solution for the problem is as different as the error messages themselves.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

15 Apr 2012, 2:12 PM
#20
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Moving site from sub directory errors

that was a typo!

What happened was I moved all the files to another directory to check that I had them in the right place. I have moved them all back and it started doing this. I have checked that all the files are in the correct place too! And have not renamed any of my admin stuff