Forums / Installing on a Linux/Unix Server / Moved cart from test dir to public_html, nothing works

Moved cart from test dir to public_html, nothing works

Locked

Started by daneh on 21 Jan 2008, 4:28 AM · Views: 2,780

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
21 Jan 2008, 4:28 AM
#1
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Moved cart from test dir to public_html, nothing works

ARGGGG!!! I started by installing the latest release of Zen Cart on my server in a directory called "Shopping Cart". After getting everything working great, I made a complete backup of my site using cPanel, and downloaded it to my computer. I then tried to move the cart to the "public_html" directory. Well, Instead of moving, I copied all the files. :oops: I checked the website, and as far as I could tell it worked ok, except for a few links to some photos, but I figured I may have changes a reference somewhere...That should have rang a few alarms, but it didn't. . At that point, I was at 95% server capacity, so I needed to get rid of the duplicate files. I got rid of the "Shopping Cart" directory, and that is where things started getting screwy.

After my frustration abated a bit, I decided to remove all the Zen files from the server and upload all the Zen backup files I had on my computer. I did so, and I ended up with a main page with no CSS formatting. Here is the site: http://custommainetotes.com.

After doing some searches on the forum, I found a post that mentioned the paths in the configure.php files needed to be edited. I did so by removing all references to "Shopping Cart" and adding "public_html". I did this on both configure.php files.
I cleared the cache, and still no CSS formatting. I then used Firefox Web Developer toolbar to View CSS, but I got ```

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>404 Not Found</TITLE> </HEAD><BODY> <H1>Not Found</H1> The requested URL /public_html/includes/templates/lavender/css/stylesheet.css was not found on this server.<P> <P>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. <HR> <ADDRESS>Apache/1.3.39 Server at custommainetotes.com Port 80</ADDRESS> </BODY></HTML> ``` I got these types of error codes on ALL stylesheets. I checked my server, and all stylesheets are there.

I then tried the links on the main page. NONE go anywhere! I get a code like this for all links: "The requested URL /public_html/index.php was not found on this server.".
Additionally, I cannot log into admin, but nothing works. I get : "The requested URL /public_html/ADMIN/login.php was not found on this server."

I downloaded fix_cache_key, and ran it. It did reset what it needed to, then I deleted it from the server.

Next, I FTP'd all files from my computer and over wrote everything on the server again, changed the configure files again, and still nothing.

Any ideas what I should do next? Here are the configure files minus the "secret" stuff: Admin configure: ```

<?php /** * @package Configuration Settings circa 1.3.8 * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 */ /*************** 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. ***********/ // 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 * * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following: */ define('HTTP_SERVER', 'http://custommainetotes.com'); define('HTTPS_SERVER', 'https://custommainetotes.com'); define('HTTP_CATALOG_SERVER', 'http://custommainetotes.com'); define('HTTPS_CATALOG_SERVER', 'https://custommainetotes.com'); // Use secure webserver for catalog module and/or admin areas? define('ENABLE_SSL_CATALOG', 'false'); define('ENABLE_SSL_ADMIN', '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_ADMIN', '/public_html/ADMIN/'); define('DIR_WS_CATALOG', '/public_html/'); define('DIR_WS_HTTPS_ADMIN', '/public_html/ADMIN/'); 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) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_ADMIN', '/home/andersa/public_html/ADMIN/'); define('DIR_FS_CATALOG', '/home/andersa/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', ''); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'SECRET'); define('DB_SERVER_PASSWORD', 'ADMIN'); define('DB_DATABASE', 'ANOTHER SECRET'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, 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', 'none'); define('DIR_FS_SQL_CACHE', '/home/andersa/public_html/cache'); // EOF ``` Here is the other: ``` <?php /** * @package Configuration Settings circa 1.3.8 * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 */ /*************** 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://custommainetotes.com'); define('HTTPS_SERVER', 'https://custommainetotes.com'); // 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/andersa/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', ''); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'SECRET'); define('DB_SERVER_PASSWORD', 'ADMIN'); define('DB_DATABASE', 'ANOTHER SECRET'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // for STORE_SESSIONS, 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', 'none'); define('DIR_FS_SQL_CACHE', '/home/andersa/public_html/cache'); ``` Thanks.
21 Jan 2008, 4:50 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

You do not need to list 'public_html' in certain paths, for both config files.
Change the following and you should be good.

includes/configure.php
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

admin/includes/configure.php
define('DIR_WS_ADMIN', '/ADMIN/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/ADMIN/');
define('DIR_WS_HTTPS_CATALOG', '/');

Also, make sure your server's 'ADMIN' directory is spelled using Capital letters, to match what you have in your config file.

The learning is in the doing.

Potent Products

21 Jan 2008, 3:45 PM
#3
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

Rob, You are a genius! :smartalec:
I knew it must have been fairly simple, I just couldn't figure out what it was. The only other thing I need to figure out is why no pictures show up. Besides checking for correct paths, is there anything else to look for?

Also, Is there a way to trim down the size of Zen Cart? My server's disk usage meter is almost maxed, but I will need to add more photos in the future. I have started to delete folders, and images that I don't think I will be needing, like DVD,Banners,Manufactures, etc, but I am a little nervous of deleting folders and files that Zen may need. Has anyone done a tutorial on this?

Thanks

21 Jan 2008, 3:53 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Moved cart from test dir to public_html, nothing works

daneh:

I have started to delete folders, and images that I don't think I will be needing, like DVD,Banners,Manufactures, etc, but I am a little nervous of deleting folders and files that Zen may need. Has anyone done a tutorial on this?This might help:
http://www.zen-cart.com/forum/showpost.php?p=303436&postcount=4

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

21 Jan 2008, 3:59 PM
#5
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

Thanks Dr Byte,

Is that little program something that is available to the masses, or is that something that you did yourself to clean up your own cart?

A little program like that may help save new Zenners some frustration....LOL...(HINT):smile:

Thanks again.

21 Jan 2008, 4:21 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Moved cart from test dir to public_html, nothing works

I posted it freely for use by anyone who wants to use it.

You can't run it on a website.

It's best to just use it as a list of files/folders to delete, and then go use your FTP program to do the cleanup. It's best used as a reference.

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

21 Jan 2008, 4:31 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Moved cart from test dir to public_html, nothing works

daneh:

I knew it must have been fairly simple, I just couldn't figure out what it was. The only other thing I need to figure out is why no pictures show up. Besides checking for correct paths, is there anything else to look for?

The links that your images are pointing to are:
http://custommainetotes.com/images/large/winter%20scene_LRG.jpg
http://custommainetotes.com/images/cc_logos/ppslv2.gif
http://custommainetotes.com/images/purple%20and%20green%20asian%20.JPG

Those paths would appear to be relatively normal.

The fact that your images are not showing up says that either the images don't exist or access is being denied to them.
You seem to have a permissions problem ... because if you try to go to one of those images, you get a 403-forbidden error.
Do you have image hotlink protection enabled in your hosting account for some reason? Maybe turn that off.

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

21 Jan 2008, 4:47 PM
#8
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

I have checked the hotlink option, and it is disabled. I also checked the location of the images folder....it is in the public_html folder.

I can kinda understand why the images I uploaded may not show up because I may have written the paths wrong, but shouldn't the products I made and the images I used show up? I didn't personally link those, Zen did....is there another image location Zen uses other than the public_html/images folder when creating products?

21 Jan 2008, 4:51 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Moved cart from test dir to public_html, nothing works

If you use your FTP program and look at what's in the /public_html/images folder, what do you see?

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

21 Jan 2008, 4:58 PM
#10
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

All my images. I can also see them through my cPanel. I have been editing my maine_page.php to see if I can correct the problem, but it doesn't seem to be working.

21 Jan 2008, 5:33 PM
#11
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

OK, Got it. It was the permission on the images folder itself. I know you told me to check permissions, and I did, but I checked the images permissions, and forgot the folder itself. I found this when I tried to edit a product to relink the image and got an bunch error messages like this ```
Warning: is_dir() [function.is-dir]: Stat failed for /home/(REMOVED)/public_html/images/. (errno=13 - Permission denied) in /home/(REMOVED)/public_html/(REMOVED)/includes/modules/product/collect_info.php on line 442


That made me look at that permission on the folder. 

I had to redo a few products to get the images to work, but everything looks like it is working fine, except the part where when you click on the product image and it shows a larger image. It shows the same image, not a larger one.

I seem to recall somewhere where Zen uses small, medium and large images right? Now I just need to fix this and I am all set.
21 Jan 2008, 9:19 PM
#12
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

Rather than edditing / uploading muliple images for each Products, there is a Module called Image Handler 2, available in the Downloads section. It allows you to upload one image file and not have to worry about Medium & Large images or directories. All resizing is done by the Mod. Also allows you to Watermark your images and provide an image popup on Mouseover. Great Mod, easy to install / figure out and highly recommended.

DrByte, nice job on the DOS script to remove unneeded default files. Been doing manually myself for each new version and this will definitely speed things up for me.

The learning is in the doing.

Potent Products

21 Jan 2008, 10:35 PM
#13
daneh avatar

daneh

Zen Follower

Join Date:
Dec 2007
Location:
Southern Maine
Posts:
268
Plugin Contributions:
0

Re: Moved cart from test dir to public_html, nothing works

Thanks Rob,

I have downloaded image handler, but didn't get a chance to use it. I wanted to get the site running so I skipped that part. I will get that done next.

I agree with you on the script on removing the default files. I still did it manually using DR Bytes list because I am not familiar with scripts yet.

You guys are awesome! :smartalec:

22 Jan 2008, 4:30 AM
#14
drbyte avatar

drbyte

Sensei

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

Re: Moved cart from test dir to public_html, nothing works

daneh:

I seem to recall somewhere where Zen uses small, medium and large images right? Now I just need to fix this and I am all set.

FAQ on images: https://www.zen-cart.com/tutorials/index.php?article=58

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