Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Oct 2009
    Posts
    22
    Plugin Contributions
    0

    Default please help site down

    I have posted on the zen cart light box page, but have not had a reply yet (inpatient) as my store is down at the moment, would really appreciate some help on this,

    Copy of post

    Hi, I copied all the contents of the install.sql file in to the install sql page, box, and then hit send, it said 9 something had been sent, but now non of my products show on the site and I have an erorr message on the bottom of my site

    please help,


    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX_RANDOM_SELECT_REVIEWS' at line 8
    in:
    [select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from zen_reviews r, zen_reviews_description rd, zen_products p, zen_products_description pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '1' and p.products_id = pd.products_id and pd.language_id = '1' and r.status = 1 limit MAX_RANDOM_SELECT_REVIEWS]

  2. #2
    Join Date
    Oct 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: please help site down

    sorry to keep posting but I reall need help with this and the site is down at the moment

  3. #3
    Join Date
    Jul 2009
    Posts
    495
    Plugin Contributions
    0

    Default Re: please help site down

    Quote Originally Posted by powelli View Post
    sorry to keep posting but I reall need help with this and the site is down at the moment
    did you backup your database before installing this addon??
    roll back if u did


    also look in your database for the table mentioned and look for line 8 maybe??
    i may not know how yet, but i soon will....i hope :)

  4. #4
    Join Date
    Oct 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: please help site down

    hi nope didnt do the back up


    Quote Originally Posted by spid3r1987 View Post
    did you backup your database before installing this addon??
    roll back if u did


    also look in your database for the table mentioned and look for line 8 maybe??

  5. #5
    Join Date
    Oct 2007
    Location
    Emporia, Kansas
    Posts
    1,762
    Plugin Contributions
    0

    Default Re: please help site down

    actually there are two of these errors

    one on the main page of the store:

    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX_DISPLAY_UPCOMING_PRODUCTS' at line 6
    in:
    [select p.products_id, pd.products_name, products_date_available as date_expected, p.master_categories_id from zen_products p, zen_products_description pd where p.products_id = pd.products_id and p.products_status = 1 and pd.language_id = '1' and p.products_date_available >20100115235959 order by date_expected desc limit MAX_DISPLAY_UPCOMING_PRODUCTS]


    and then the admin section has its own too, whic changes depending on the section you go to..products has this one:

    Warning: Division by zero in /home/elfefcom/public_html/store/admin/includes/classes/split_page_results.php on line 39
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, MAX_DISPLAY_RESULTS_CATEGORIES' at line 12
    in:
    [select p.products_type, p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_model, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_quantity_order_max, p.products_sort_order from zen_products p, zen_products_description pd, zen_products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '0' order by p.products_sort_order, pd.products_name limit -0, MAX_DISPLAY_RESULTS_CATEGORIES]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

    ideas of what to do? I replaced all the store files and it did not help any at all. He has a custom theme and can not access the template section to get to the classic template...but I did change it in database to no avail for the different 1064 messages are in the classic template too.

    If I get rid of his tables the items will still be on the server but he will need to re-enter all info into the store again. He had done the lightbox sql installation about 3 times and those have been removed...will remove the files too.

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

    Default Re: please help site down

    Quote Originally Posted by DarkAngel View Post
    ideas of what to do? I replaced all the store files and it did not help any at all.
    .
    Firstly, DON'T attempt to delete any database tables or records. THERE IS RARELY EVER A REASON that this needs to be done (even after a failed modules installation/removal). Additional/unused DB tables or records are not likely to cause any problems.

    Secondly, replacing the store files will only help if the store files have been modified or changed in any way. If the module requires *additional* files to be installed (as most do) these won't be affected by replacing the original store files, unless you delete *all* the files and start afresh.

    At this stage I wouldn't even contemplate such an action.

    OK, so now I've told you what NOT to do, it is time to actually DIAGNOSE the problem and THEN take action to fix it. This is actually going to be quite easy

    Firstly, the 'problem' as indicated is: "1064 You have an error in your SQL syntax"

    The SYNTAX error(s) being related to undefined CONSTANTS, namely,
    MAX_DISPLAY_UPCOMING_PRODUCTS,
    MAX_DISPLAY_RESULTS_CATEGORIES

    CONSTANTS can/will originate from one of two places, the SQL Database (which is why deleting tables/records is a bad idea), or, the language/php files.

    The fact that you/we are seeing the CONSTANT NAMES rather than the CONSTANT values is telling us that the actual data is missing from the database or the files. This would suggest that either the data wasn't correctly uploaded in the first place, or has since been removed (as a result of reverting back to older files).

    Solution. Ensure that these constants get defined, OR remove any code that uses these constants.

    If you review the files that came with the module that you tried to install you should be able to identify whether these defines are DB based or File based (perform a word seach/find) . If file based just copy the relevent file over to your store (and assume it wasn't copied the first time for some reason). If DB based then run the SQL setup script that came with the module again (ensure you set/use the correct table prefix).

    To remove the module you'll need to delete any FILES that it added to your store (and revert any that were modified). As previously mentioned, you will NOT need to remove any database records that may have been added.

    In my experience it us usually easier to 'finish' a failed module installation that it is to try to remove them.

    Cheers
    Rod

    ps. A *possible* "dirty fix" would be to add the following to your english.php file:

    MAX_DISPLAY_UPCOMING_PRODUCTS = 10
    MAX_DISPLAY_RESULTS_CATEGORIES = 10
    Last edited by RodG; 16 Jan 2010 at 10:06 AM.

  7. #7
    Join Date
    Oct 2007
    Location
    Emporia, Kansas
    Posts
    1,762
    Plugin Contributions
    0

    Default Re: please help site down

    welllllll, I actually have replaced all the store files with fresh untouched ones from the store install zip.

    I did go through prior to that and looked for any of the lightbox files in the wrong places but found none.

    I, as I said found that lightbox had been installed (sql rather was ran 3 times because that was the only thing that showed up under the configurations drop down menu). So I ran the uninstaller to get rid of it...but just in case I will re run the uninstaller via the db instead of store admin section.

    I shall come back with results. Thanks



    Quote Originally Posted by RodG View Post
    Firstly, DON'T attempt to delete any database tables or records. THERE IS RARELY EVER A REASON that this needs to be done (even after a failed modules installation/removal). Additional/unused DB tables or records are not likely to cause any problems.

    Secondly, replacing the store files will only help if the store files have been modified or changed in any way. If the module requires *additional* files to be installed (as most do) these won't be affected by replacing the original store files, unless you delete *all* the files and start afresh.

    At this stage I wouldn't even contemplate such an action.

    OK, so now I've told you what NOT to do, it is time to actually DIAGNOSE the problem and THEN take action to fix it. This is actually going to be quite easy

    Firstly, the 'problem' as indicated is: "1064 You have an error in your SQL syntax"

    The SYNTAX error(s) being related to undefined CONSTANTS, namely,
    MAX_DISPLAY_UPCOMING_PRODUCTS,
    MAX_DISPLAY_RESULTS_CATEGORIES

    CONSTANTS can/will originate from one of two places, the SQL Database (which is why deleting tables/records is a bad idea), or, the language/php files.

    The fact that you/we are seeing the CONSTANT NAMES rather than the CONSTANT values is telling us that the actual data is missing from the database or the files. This would suggest that either the data wasn't correctly uploaded in the first place, or has since been removed (as a result of reverting back to older files).

    Solution. Ensure that these constants get defined, OR remove any code that uses these constants.

    If you review the files that came with the module that you tried to install you should be able to identify whether these defines are DB based or File based (perform a word seach/find) . If file based just copy the relevent file over to your store (and assume it wasn't copied the first time for some reason). If DB based then run the SQL setup script that came with the module again (ensure you set/use the correct table prefix).

    To remove the module you'll need to delete any FILES that it added to your store (and revert any that were modified). As previously mentioned, you will NOT need to remove any database records that may have been added.

    In my experience it us usually easier to 'finish' a failed module installation that it is to try to remove them.

    Cheers
    Rod

    ps. A *possible* "dirty fix" would be to add the following to your english.php file:

    MAX_DISPLAY_UPCOMING_PRODUCTS = 10
    MAX_DISPLAY_RESULTS_CATEGORIES = 10

  8. #8
    Join Date
    Oct 2007
    Location
    Emporia, Kansas
    Posts
    1,762
    Plugin Contributions
    0

    Default Re: please help site down

    readded the files for the lightbox...ran lightbox installer and nope...

    the lightbox was the only thing listed in configuration drop down menu and error is still showing.

    re-ran the uninstaller sql and the lightbox config is gone --- then removed all the files and still the error is there.

    added the "dirty fix" to the english.php file and was greeted with no main page at all but the errors were still in admin...lol

    so I still have a sick site, I have no idea why the configuration drop down menu is not showing either.

    later today when I get up, I will go see if there is a place in the db that I can set the amount of images to be viewed but really do not think it will help the pages any.

    any more ideas????

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

    Default Re: please help site down

    Quote Originally Posted by DarkAngel View Post
    welllllll, I actually have replaced all the store files with fresh untouched ones from the store install zip.
    Yes, and what I was saying that if a module installs new files, eg /includes/modules/newmofule.php then replacing the store files isn't going to *remove* this file, so it could still cause a problem.

    Quote Originally Posted by DarkAngel View Post
    I did go through prior to that and looked for any of the lightbox files in the wrong places but found none.
    Not even the one you missed ;-)

    Quote Originally Posted by DarkAngel View Post
    but just in case I will re run the uninstaller via the db instead of store admin section.
    Fsck. You didn't read a word I wrote did you?
    This was the first thing I told you to NOT do.

    I'm not sure which way to tell you to go from here. You probably just dug yourself into a deeper hole. :-( I guess I can only wait for you to post your results.

    Rod

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

    Default Re: please help site down

    Quote Originally Posted by DarkAngel View Post
    added the "dirty fix" to the english.php file and was greeted with no main page at all but the errors were still in admin...lol
    I'll wager that you simply copied my text (which was meant as a guide only). You probably needed to add a couple of quotes, or terminate the lines with a semi colon.

    Quote Originally Posted by DarkAngel View Post
    so I still have a sick site, I have no idea why the configuration drop down menu is not showing either.
    You have a seriously sick database.

    Quote Originally Posted by DarkAngel View Post
    any more ideas????
    To be perfectly frank, no I don't. You did the one thing a zencart user should never do, namely run an uninstall script on your database. This is *always* going to cause more problems than it will ever solve. A well behaved uninstall script is unlikely to cause a problem directly, but a badly written one can cause irreparable damage. I have no idea which category the lightbox uninstall script fits into. Not running an SQL uninstall script at all, even if the relevent module files are deleted will never cause a problem, directly or indirectly.

    About the only way I can see you recovering now is with a fresh install.

    Sorry to be the bearer of this sad news.

    Rod

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Site Down - Please help!
    By vidmarc in forum General Questions
    Replies: 6
    Last Post: 25 Oct 2011, 02:49 PM
  2. Site Down! Please Help!
    By autoace in forum Upgrading from 1.3.x to 1.3.9
    Replies: 9
    Last Post: 13 Sep 2009, 02:53 AM
  3. Urgent help please, site down!
    By BikeTuna in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Jul 2009, 08:07 PM
  4. Site down please help
    By fabpatch in forum General Questions
    Replies: 7
    Last Post: 26 Mar 2009, 03:02 PM
  5. Please help site down
    By mate2007 in forum General Questions
    Replies: 3
    Last Post: 8 Apr 2008, 12:26 PM

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