Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Join Date
    Jul 2017
    Location
    United States
    Posts
    15
    Plugin Contributions
    0

    help question Directory and URL issues

    An error occurred when I installed my zencart (v1.5.5e)...

    Somehow, it created a "zencart" directory in my "htdocs" directory, so pointing a browser to my host account name does not bring up my web-store. You have to add "/zencart/" to the end of the URL to get there.
    ie:
    whereas the URL:
    http://survivingwisely.hostfree.pw/ does not go to my store...

    Now... my problem is... that I have a domain name, (Not on my host acct) and have pointed it to my host acct DNS, but because my store is in the "/zencart/" folder, instead of the "htdocs/"folder, ("public html" folder on most hosts) it will not bring up my store when my domain name URL is used.
    ie: http://survivingwisely.com

    I have tried to copy all the folders from the "/zencart/" folder up into the "/htdocs/" ("public html/") folder, and that does not work at all...

    ...................so, I am entertaining the idea of re-installing a fresh zencart into the correct directory, so it'll come up with the homepage host URL of "http://survivingwisely.hostfree.pw/" ---WITHOUT having to add "/zencart/" to the end of the URL...

    ...................then copying all the files from my existing "/zencart/" directory into it, so all my code changes, images, products, etc., all go into the store without having to do days and days of coding and adding my products and logo changes, and images, etc., again....

    Can someone advise me on this; if my idea is correct, or not, and if not, then how can I do this without having to do all the coding and, and, and, ...changes from scratch again.

    I'm so tired of all the coding. I am pretty well fluent in html, but NOT fluent in PHP and css coding, (I know, that dates me lolol) so it would be a HUGE mess for me if I had to try to do it again. It's all working right now, so I do not want to have to go through all that again. Not now that I have all that behind me....

    Thanks in advance for any help and advice on this.

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Directory and URL issues

    Whenever having DNS problems it is always best to discuss them with your Hoster. Being as you are Hosting with a Free Hosting company they may have things setup a little differently than a pay for Hosting company which they can advise you about. And when having problems installing Zen Cart or any script for that matter, always best to state how the install was done.

    With that said, what happens if you point 'survivingwisely.com' to 'survivingwisely.hostfree.pw/zencart/' instead of 'survivingwisely.hostfree.pw'?

    If it works then problem solved but you'll always have 'zencart' in the URL which may not be preferable.

  3. #3
    Join Date
    Jul 2017
    Location
    United States
    Posts
    15
    Plugin Contributions
    0

    Default Re: Directory and URL issues

    Thank you Rob, for your reply. In answer to your questions, I have quoted and answered below each quote, to keep it clear. lol
    Also, the other duplicate post was done accidentally.... I will try to remove that one, and keep communications to this thread... sorry

    Quote Originally Posted by Website Rob View Post
    ....always best to state how the install was done.
    I installed it with the softaculous installer from within the file manager at my hostree cpanel. I think that while I was installing, I should have left the directory name empty, and then it would have installed into the public html directory without the added directory of "zencart." So, if I do have to re-install the zencart into the proper directory, I think I can do it right, but again, I do not want to have to go through another week of coding, when I've already done all that, and the store is looking the way I want it to look.

    ....what happens if you point 'survivingwisely.com'
    Right now, I have changed my domain name settings away from the DNS, to the simple redirect, and have redirected it to the http://survivingwisely.hostfree.pw/zencart/ URL, so it is going there... Not the URL I want, so this setting is temporary...

    ....to 'survivingwisely.hostfree.pw/zencart/' instead of 'survivingwisely.hostfree.pw'?
    Going to http://survivingwisely.hostfree.pw/zencart/ takes me to the store, but again....... it is not the URL I need it to work at.
    I need it to be able to go to http://survivingwisely.hostfree.pw. But, because the store is in the "zencart/" directory, the http://survivingwisely.hostfree.pw URL is going to the blank index page set up on the server saying, "Congratulations! Your free hosting account has been activated. You can now use FTP or the file manager to upload your site." ...Again, because the store is set up in the "/zencart/" directory instead of the public html directory.

    I need to know if I can just move all my files, within my "/zencart/" directory into the public html directory and still have the store work as I have it coded, or if I will have to redo a lot of the links and code within, to images and whatever....

    OR, if I need to install a fresh zencart application into the public html directory, then overwrite the files in there to the ones I have already set up..... AND, if I have to do it that way, will I still have to spend the next week finding all the code changes I made and redoing them again, or will it work just by overwriting the new files in the new zencart installation with the ones I have already changed.....

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: Directory and URL issues

    post the contents of your:

    includes/configure.php

    file. please remove your DB username and password from that file.

    i would not advise doing a reinstall...
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #5
    Join Date
    Jul 2017
    Location
    United States
    Posts
    15
    Plugin Contributions
    0

    Default Re: Directory and URL issues

    Quote Originally Posted by carlwhat View Post
    post the contents of your:

    includes/configure.php

    file. please remove your DB username and password from that file.

    i would not advise doing a reinstall...
    Okay, here it is:
    ----------------------------------------------------
    <?php
    /**
    * @package Configuration Settings
    * @copyright Copyright 2003-2016 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 Zen Cart Installer on Thu Jul 20 2017 21:19:41
    */

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

    /**
    * Enter the domain for your store
    * HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com
    * HTTPS_SERVER is your Secure/SSL webserver: eg-https://www.yourdomain.com
    */
    define('HTTP_SERVER', 'http://survivingwisely.hostfree.pw');
    define('HTTPS_SERVER', 'https://survivingwisely.hostfree.pw');

    /**
    * If you want to tell Zen Cart to use your HTTPS URL on sensitive pages like login and checkout, set this to 'true'. Otherwise 'false'. (Keep the quotes)
    */
    define('ENABLE_SSL', '');

    /**
    * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
    * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
    * They should always start and end with a slash ... ie: '/' or '/foldername/'
    */
    define('DIR_WS_CATALOG', '/zencart/');
    define('DIR_WS_HTTPS_CATALOG', '/zencart/');

    /**
    * This is the complete physical path to your store's files. eg: /var/www/vhost/accountname/public_html/store/
    * Should have a closing / on it.
    */
    define('DIR_FS_CATALOG', '/home/vol3_4/hostfree.pw/epree_20398937/htdocs//zencart/');

    /**
    * The following settings define your database connection.
    * These must be the SAME as you're using in your non-admin copy of configure.php
    */
    define('DB_TYPE', 'mysql'); // always 'mysql'
    define('DB_PREFIX', 'zenba_'); // prefix for database table names -- preferred to be left empty
    define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
    define('DB_SERVER', 'sql207.byetcluster.com'); // address of your db server
    define('DB_SERVER_USERNAME', '**********');
    define('DB_SERVER_PASSWORD', '**********');
    define('DB_DATABASE', '****************');

    /**
    * This is an advanced setting to determine whether you want to cache SQL queries.
    * Options are 'none' (which is the default) and 'file' and 'database'.
    */
    define('SQL_CACHE_METHOD', 'none');

    /**
    * Reserved for future use
    */
    define('SESSION_STORAGE', 'reserved for future use');

    /**
    * Advanced use only:
    * The following are OPTIONAL, and should NOT be set unless you intend to change their normal use. Most sites will leave these untouched.
    * To use them, uncomment AND add a proper defined value to them.
    */
    // define('DIR_FS_SQL_CACHE' ...
    // define('DIR_FS_DOWNLOAD' ...
    // define('DIR_FS_LOGS' ...

    // End Of File

    ------------------------------------------------------------------

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Directory and URL issues

    The FAQS on this topic are more than helpful, though there is also an error in the configure.php file (possibly the admin version as well).

    FAQ to move store to another directory (instead of all this redirect/base directory moving stuff being discussed):
    https://www.zen-cart.com/content.php...that-directory

    As to the error identified:
    Code:
    define('DIR_FS_CATALOG', '/home/vol3_4/hostfree.pw/epree_20398937/htdocs//zencart/');
    Should have only one forward slash (/) not double (//). This is likely/possible because of using the softaculous auto-installer.

    Further, potentially running that again has the possibility of clearing out your existing database if it 1) doesn't ask for specific database information or 2) were provided all of the same database information (including DB_PREFIX) that offers access to the current data/database.

    Now as far as also revisiting directory alignment/assignment to an "internal" folder where visitors see the site accessible from just the domain name. (somewhat where I think others are trying to guide you), there is a bit of benefit to that as other sub-domains can be easily generated and not interfere with your primary domain. That does depend on what your host allows.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Directory and URL issues

    First thing to do is check in your Hosting account settings/control panel and see if you have an Addon Domain feature. Probably wont' so ask your Hoster about it. Not sure why you went with a Free Hoster as pay-for Hosting gives you much better options. For example you could actually use 'survivingwisely.com' and have that show in the Browser, which you may not be able to with a Free Hoster.

    If the above is not an option then download the entire 'zencart' dir. after which you can again use Softaculous to do another install and yes, this time leave the install dir. blank. You will then be able to upload files you've changed in the 'zencart' dir. on your computer to the new install.

    You might also need to Import your previous database and your Hoster can help with that.

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: Directory and URL issues

    i would change from:
    Code:
    define('DIR_WS_CATALOG', '/zencart/');
    define('DIR_WS_HTTPS_CATALOG', '/zencart/');
    
    /**
    * This is the complete physical path to your store's files. eg: /var/www/vhost/accountname/public_html/store/
    * Should have a closing / on it.
    */
    define('DIR_FS_CATALOG', '/home/vol3_4/hostfree.pw/epree_20398937/htdocs//zencart/');
    to:
    Code:
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');
    
    /**
    * This is the complete physical path to your store's files. eg: /var/www/vhost/accountname/public_html/store/
    * Should have a closing / on it.
    */
    define('DIR_FS_CATALOG', '/home/vol3_4/hostfree.pw/epree_20398937/htdocs/zencart/');
    and it looks like you would not even need to move all of the files up 1 level. if you chose to move them up 1 level, you would need to remove the '/zencart' at the end of the DIR_FS_CATALOG.

    with regards to the DNS, if you were to get survivingwisely.com to point to http://survivingwisely.hostfree.pw, you would then to change the following:

    Code:
    define('HTTP_SERVER', 'http://survivingwisely.hostfree.pw');
    define('HTTPS_SERVER', 'https://survivingwisely.hostfree.pw');
    
    //to:
    define('HTTP_SERVER', 'http://survivingwisely.com');
    define('HTTPS_SERVER', 'https://survivingwisely.com');
    but i would do it 1 step at a time.

    you will also need to change:

    YOUR_ADMIN/includes/configure.php

    as well.

    i would not even bother talking to your host at this point if it was me...

    good luck!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  9. #9
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Directory and URL issues

    What is say is all well and good Carl, but we cannot forget about eMail which config files don't cover and hasn't yet been discussed.

  10. #10
    Join Date
    Jul 2017
    Location
    United States
    Posts
    15
    Plugin Contributions
    0

    Default Re: Directory and URL issues

    Quote Originally Posted by mc12345678 View Post
    The FAQS on this topic are more than helpful, though there is also an error in the configure.php file (possibly the admin version as well).

    FAQ to move store to another directory (instead of all this redirect/base directory moving stuff being discussed):
    https://www.zen-cart.com/content.php...that-directory

    As to the error identified:
    Code:
    define('DIR_FS_CATALOG', '/home/vol3_4/hostfree.pw/epree_20398937/htdocs//zencart/');
    Should have only one forward slash (/) not double (//). This is likely/possible because of using the softaculous auto-installer.

    Further, potentially running that again has the possibility of clearing out your existing database if it 1) doesn't ask for specific database information or 2) were provided all of the same database information (including DB_PREFIX) that offers access to the current data/database.

    Now as far as also revisiting directory alignment/assignment to an "internal" folder where visitors see the site accessible from just the domain name. (somewhat where I think others are trying to guide you), there is a bit of benefit to that as other sub-domains can be easily generated and not interfere with your primary domain. That does depend on what your host allows.
    Okay, thanks so much. I removed the extra forward slash, but that was an issue too. The permissions were, or course, "r--r--r" so I could not edit it, and the server did not have anywhere to be able to change permissions, so I had ftp it to my puter, so I could edit it, then change the name of the "configure.php" file on the server, so I could ftp the changed edited one from my puter to the directory. It's fine, but now I cannot change the permissions on the new configure.php file to "r--r--r" The permissions are now "rw--r--r" (I'm concerned about that...)

    --------------------------------------------------------------

    Now I am reading through the link you provided, and will follow those instructions. I will be back to follow up on this... Again, thanks for this help.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Issues with catagory url re-writes with simple seo url addon
    By aaronspromotions in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 12 Jan 2013, 03:07 PM
  2. Simple SEO URL and Change of Shop Directory
    By Jordin in forum General Questions
    Replies: 3
    Last Post: 11 Aug 2009, 09:56 PM
  3. Path and URL locations for directory move of zc install?
    By schwimwastaken in forum General Questions
    Replies: 1
    Last Post: 21 Apr 2009, 07:17 PM
  4. Logo.gif - URL directory
    By miles in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 18 Oct 2006, 06:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR