Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Sep 2007
    Location
    Far South Coast, NSW, Australia
    Posts
    436
    Plugin Contributions
    0

    Default Can I close the store for maintenance... from the database?

    Hello,
    Interesting one, this.
    Our admin has disappeared - all I'm getting in the installation screen - although the store is still up and appears to be working fine. I can see that admin/includes/configure.php has lost all its connection details, but when I correct them, the file reverts to "localhost" etc upon saving.
    So I want to back up the files and database so I can reinstall, but first I need to close the store for maintenance. Can I do this from the database in phpMyadmin?

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Can I close the store for maintenance... from the database?

    When you save your confiure.php to the server. did you remember to make it writeable (664 or 666) first? Otherwise your changes will not be saved on the server.

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Can I close the store for maintenance... from the database?

    Quote Originally Posted by jenpen View Post
    but first I need to close the store for maintenance. Can I do this from the database in phpMyadmin?
    Yes. Run the following SQL command

    Code:
    UPDATE configuration set configuration_value = 'true' where configuration_key = 'DOWN_FOR_MAINTENANCE';
    Cheers
    Rod

  4. #4
    Join Date
    Sep 2007
    Location
    Far South Coast, NSW, Australia
    Posts
    436
    Plugin Contributions
    0

    Default Re: Can I close the store for maintenance... from the database?

    Thanks Design75 but yes, it was writeable. My changes disappear upon Save. But thanks RodG, that exactly what I need.

  5. #5
    Join Date
    Sep 2007
    Location
    Far South Coast, NSW, Australia
    Posts
    436
    Plugin Contributions
    0

    Default Re: Can I close the store for maintenance... from the database?

    Guys, I exported the DB, reinstalled ZC and have just tried to import the DB. But I'm getting:
    Error

    SQL query:

    --
    -- Dumping data for table `address_format`
    --
    INSERT INTO `address_format` ( `address_format_id` , `address_format` , `address_summary` )
    VALUES ( 1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country', '$city / $country' ) , ( 2, '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country', '$city, $state / $country' ) , ( 3, '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country', '$state / $country' ) , ( 4, '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country', '$postcode / $country' ) , ( 5, '$firstname $lastname$cr$streets$cr$postcode $city$cr$country', '$city / $country' ) , ( 6, '$firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country', '$postcode / $country' ) ;

    MySQL said: Documentation
    #1062 - Duplicate entry '1' for key 1

    What to do?

  6. #6
    Join Date
    Sep 2007
    Location
    Far South Coast, NSW, Australia
    Posts
    436
    Plugin Contributions
    0

    Default Re: Can I close the store for maintenance... from the database?

    I just tried the same import again. This time it's giving the same error message but there are real names and addresses in the data.

  7. #7
    Join Date
    Sep 2007
    Location
    Far South Coast, NSW, Australia
    Posts
    436
    Plugin Contributions
    0

    Default Re: Can I close the store for maintenance... from the database?

    I'm stuck here, so if anyone can cast some light, please don't hold back

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Can I close the store for maintenance... from the database?

    Quote Originally Posted by jenpen View Post
    I'm stuck here, so if anyone can cast some light, please don't hold back
    Option1: Delete the data from the table before trying to import new data.
    Option2: Assuming the data that already exists in the table is valid, then simply ignore this error.

    Oh, there should *not* be real names in the import data. The data contains variable names only.

    Cheers
    Rod

  9. #9
    Join Date
    Sep 2007
    Location
    Far South Coast, NSW, Australia
    Posts
    436
    Plugin Contributions
    0

    Default Re: Can I close the store for maintenance... from the database?

    RodG, excuse this phpMyadmin amateur, but I am having trouble deleting the whole database. I know the SQL for deleting from a table, so I'm trying to use that, ie delete from 'prefix_databasename'. But I get a syntax error. I guess I could delete each table one by one, but trying to avoid that.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Can I close the store for maintenance... from the database?

    You're supposed to "Include DROP/CREATE TABLE IF EXISTS" support when you're doing your backup. See: http://www.zen-cart.com/content.php?...atabase-backup

    If you didn't do that, then you'll need to "drop" all your normal Zen Cart tables before you can import data back into them. Hopefully your backup at least includes "CREATE TABLE" statements. If not, then you'll be an even bigger pickle.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. how can I remove the logo "Computer store the.." from the header and put my own.
    By fkalanda in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Jul 2013, 09:23 PM
  2. v138a Can I move the categores after running the store for 2 years?
    By mybiz9999 in forum General Questions
    Replies: 6
    Last Post: 28 Aug 2012, 02:04 PM
  3. Replies: 1
    Last Post: 15 Sep 2010, 10:57 PM
  4. Can I export the zen cart database from the admin?
    By jettrue in forum General Questions
    Replies: 2
    Last Post: 13 Apr 2009, 08:11 AM
  5. How can I put back the countries I deleted from the database?
    By whitknits in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 20 Dec 2007, 03:54 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