ICECold2 Posted July 11, 2003 Share Posted July 11, 2003 Hi, Something bad happened with the admin section of my site DEFINE constants are displayed as their title not as they supposed to be .. : like here Administration | Online Catalog | Support Site osCommerce BOX_ENTRY_SUPPORT_SITE BOX_ENTRY_SUPPORT_FORUMS BOX_ENTRY_MAILING_LISTS BOX_ENTRY_BUG_REPORTS BOX_ENTRY_FAQ BOX_ENTRY_LIVE_DISCUSSIONS BOX_ENTRY_CVS_REPOSITORY BOX_ENTRY_INFORMATION_PORTAL that is a minor inconvenience compare to the error I'm getting when I want to select product attributes ' HEADING_TITLE_OPT TEXT_OPTION_IDTEXT_OPTION_NAME Warning: Division by zero in /home/offprice/public_html/shop/admin/products_attributes.php on line 214 >> TABLE_HEADING_ID TABLE_HEADING_OPT_NAME TABLE_HEADING_ACTION 1064 - You have an error in your SQL syntax near 'MAX_ROW_LISTS_OPTIONS' at line 1 select * from products_options where language_id = '1' order by products_options_id LIMIT 0, MAX_ROW_LISTS_OPTIONS [TEP STOP] It was working .... don't really know what happened ... Any clues on how to fix it ? I went through the code but I didn't have enough time to study it in full BTW while it's not fixed is which tables should I modify if I want to enter new attributes ? Link to comment Share on other sites More sharing options...
Guest Posted July 11, 2003 Share Posted July 11, 2003 it appears, you have a mistake in product_attributes, line 214, the >> could be part of the problem, or all, and if you edited more files , you may have more problems. Start there, and use a text editor Link to comment Share on other sites More sharing options...
Guest Posted July 12, 2003 Share Posted July 12, 2003 Hmm...I would guess that the division by zero error is caused by a CONSTANT not being replaced with a number. Usually in these cases, you will get an error about application_top.php not being included or something. The most common causes of this are misformed files. If you have been doing a lot of modding, you can diagnose this by renaming the current files to whatever.php.mod and copying in original copies. Another thing to check is that your language is being picked up properly. To do this, you can hard code $language=english (or whatever) in application_top.php where it is figuring out the current language. If you find out that a particular file is causing the problem (presumably because it is malformed), you may be able to edit it back into shape with an html/php editor with color coding. This will enable you to see if large blocks of code are caught in comment blocks, etc. Btw, the editor included in the admin area can be a bit buggy. It is recommended that you use some kind of external editor and ftp files back and forth. Hth, Matt Link to comment Share on other sites More sharing options...
mark057 Posted March 21, 2005 Share Posted March 21, 2005 Hmm...I would guess that the division by zero error is caused by a CONSTANT not being replaced with a number. Usually in these cases, you will get an error about application_top.php not being included or something. The most common causes of this are misformed files. If you have been doing a lot of modding, you can diagnose this by renaming the current files to whatever.php.mod and copying in original copies.<{POST_SNAPBACK}> Unfortunately, I am also getting this. I have tried everything from original files to using ftp to replace the files. I did find a malformed file in customers, orders; but that is now working... it was giving me the same error, and a new file cleaned it up. That fix didn't work this time. I am also getting a blank page in specials.php which also worked before this came up... any connection? Mark057 Link to comment Share on other sites More sharing options...
mjm Posted March 21, 2005 Share Posted March 21, 2005 Restore from backup, you did backup recently didn't you? ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.