Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Dec 2010
    Location
    Scotland
    Posts
    39
    Plugin Contributions
    0

    Default Problems changing install directory

    I followed the instructions on https://www.zen-cart.com/tutorials/i...hp?article=122 to change my install directory to the root of my site, it seemed to work OK at first, but now I am just getting...

    Sorry!
    There seems to be a problem connecting to our database. Please give us a few minutes to remedy the problem. Thank you.


    I still have the original install in place as I didn't want to delete it until I was sure the new install was OK, what is puzzling me is after I login to my new Zen Cart admin directory, the url has /catalog/ and all the links are to /catalog/ (the old install dir.), so it seems I am being re-directed to the old admin area.

    NB there is also a setting in my web-host control panel to specify the installation directory, but changing that didn't fix the problem.

    Any help please? thanks
    Last edited by double-happiness; 30 Nov 2011 at 01:48 PM.

  2. #2
    Join Date
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    Just a few thoughts based on mistakes I might have made myself but I'm not admitting to it -

    Step 4 of that tutorial is critical - if you don't set the permissions to writable first, then you just think you've made the changes but you really didn't. And if you're doing it in the middle of the night, 16 hours in front of the monitor with nothing but stale doritos and a 6-pack of red bull, it's easy to make the same mistake over and over and over....

    Are you following the old bookmark to get to the new admin site?
    (Try typing in www.yourdomain/yoursecretadmin/login.php)

    And the big one - if it worked, but then it doesn't - Did your host take the server down for maintenance without telling you?

  3. #3
    Join Date
    Dec 2010
    Location
    Scotland
    Posts
    39
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    Thanks for the response.

    The edits look to have been saved fine...

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

    I take it that would be right for the root directory?

    I'm defintely logged in to the new install, all the links shown there are fine.

  4. #4
    Join Date
    Dec 2010
    Location
    Scotland
    Posts
    39
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    Seems to be OK now. Should I just go ahead and delete the old installation, is there a way to deactivate it without removing the files, or would that be more of a security risk?

  5. #5
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    I don't see any reason you can't keep the old install as a test site, but if it's still sharing the same database as the live site, any changes you make will be reflected in both sites. You could create a separate database for the "old" cart (create the db, copy the live db into it and then change the config of the "old" cart to point to the test db).
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  6. #6
    Join Date
    Dec 2010
    Location
    Scotland
    Posts
    39
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    The cart on my main page is now permanently down.

    Sorry!
    There seems to be a problem connecting to our database. Please give us a few minutes to remedy the problem. Thank you.


    ...is all I can get at present. Any suggestions please?

    I've been working on this for about a year now and yet to see a stable install at the url I want

  7. #7
    Join Date
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    Talk to your host and ask then why the server is constantly going down.

  8. #8
    Join Date
    Dec 2010
    Location
    Scotland
    Posts
    39
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    ^ Done.

    I am a bit concerned about the way I've set the database users up though and wonder if I have bothced that in some way. I tried to set up rotating database users but maybe didn't get it right.

    For both installs I have...

    $dbuser[] = 'zncif2yUBqK';
    $db_pwd[] = '***';

    $dbuser[] = 'user_2';
    $db_pwd[] = '***';

    $dbuser[] = 'user_3';
    $db_pwd[] = '***';

    $dbuser[] = 'user_4';
    $db_pwd[] = '***';

    ...in includes/configure.php

    define('DB_SERVER_USERNAME', 'zncif2yUBqK');
    define('DB_SERVER_PASSWORD', '***');

    ...in admin/includes/configure.php

    The passwords for the extra users I added have some special characters so maybe that is causing problems. I'm pretty sure I created the databases OK though.

  9. #9
    Join Date
    Oct 2011
    Location
    AZ
    Posts
    384
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    I think, and I hope a zen-master jumps in and corrects or verifies, that there are two types of users in play here.

    When you created the initial SQL database prior to installing ZC, you gave it a name, and then created a user and gave that user a name/password. I'm assuming that's the name you've got down there under DB_SERVER_USERNAME. Whenever you do something in the ZC that requires playing in the database, ZC goes to that line in the config to get the username/password to log in to the db.

    All the other users are just admin users - people who have permission to log into the admin panel and do admin stuff. Those accounts are created from the admin panel - Tools > Admin Settings.

    You can create 10 different administrators there, and they can all log in to the admin side and do admin stuff, but whichever one is logged in doesn't matter when it's time to write to the db - at that time ZC reads the config file, and logs in to the db as DB_SERVER_USERNAME.

    So it doesn't matter how many admins you have, it shouldn't affect use. I still think it looks like your host server is unreliable. When it is down, have you tried seeing your storefront? Look at your webmaster account in Google/Bing and see if you're getting not-found errors of "unreachable". The settings in ZC are either off, or on. The password wouldn't work correctly one day and wrong the next.

    I should add - if when you created your sql database, you also created multiple users, that too wouldn't have any effect on the equation. ZC logs in using the DB_SERVER_USERNAME and it could care less about who else you gave permission to.

  10. #10
    Join Date
    Dec 2010
    Location
    Scotland
    Posts
    39
    Plugin Contributions
    0

    Default Re: Problems changing install directory

    Ah, but...

    $dbuser[] = 'user_2';
    $db_pwd[] = '***';

    $dbuser[] = 'user_3';
    $db_pwd[] = '***';

    $dbuser[] = 'user_4';
    $db_pwd[] = '***';

    ..was entered manually, it was supposed to be a fix for database lag by creating rotating database users. What puzzles me though is that includes/configure.php is exactly like that for both installs, but it is only the one at the root of my site that is having problems, the other install is absolutely fine!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. changing install directory
    By neit in forum General Questions
    Replies: 6
    Last Post: 14 Sep 2010, 12:08 PM
  2. Changing from root to sub directory problems
    By Whale in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 20 Jul 2009, 10:46 PM
  3. Install wizard not allowing install in /secure/ directory
    By Ricky_O in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 15 Apr 2007, 09:04 PM

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