PJ2006 Posted May 8, 2007 Share Posted May 8, 2007 Hi PJ2006. Your efforts to troubleshoot will go easier if you learn how to read the error messages. I don't claim to be an expert at it, but the error messages in your previous posts are all very helpful. First, anytime you get an error message that includes a term in all uppercase, you have a constant that isn't defined. For example, a few posts back, you listed the following error: 1146 - Table 'effortle_oscl.TABLE_COUNTER' doesn't exist In this case, TABLE_COUNTER wasn't defined in the database_tables.php file (or equivalent STS file). As it had been working previously, I would suspect a change you made for this contribution introduced an error in that file. As the file only contains a list of define statements, my guess would be the new table definition was entered without the ending semi-colon (";"). We see this kind of error most often when an installation step was missed and a filename, database table or text definition wasn't added to the appropriate file. Next, the errors that begin "Fatal error: Cannot redeclare" are telling you the same function has been "declared" in more than one place. And then the message goes on to tell you exactly where it is declared: Fatal error: Cannot redeclare tep_set_banner_status() (previously declared in /home/effortle/publich_html/catalog/includes/functions/general.php:706) in /home/effortle/public_html/catalog/includes/functions/banner.php on line 15 This message tells you that "function tep_set_banner_status()" exists on line 706 of general.php, and that is also exists on line 15 of banner.php. A quick search of the files in an unmodified version of osc shows me that it belongs in banner.php, so you need to remove it from general.php. If the copy in general.php contains any recent changes (not part of this contribution, for anyone listening in) you should 'cut' it from general and 'paste' it in banner.php in place of the old function. Be sure to include the entire function through it's final end bracket ("}") or you will introduce more errors, one in each file. In the following error, Fatal error: Cannot redeclare tep_get_products_description() (previously declared in /home/effortle/public_html/catalog/admin/includes/functions/general.php:518) in /home/effortle/public_html/catalog/admin/includes/functions/general.php on line 525 the message is telling you that "function tep_get_products_description()" is in the admin general.php file twice, once on line 518 and again on line 525. In this instance, I suspect you copied the change from the install instructions and inserted the copied code under the existing function instead of replacing the existing function with the copied code. Just remove one of the two identical functions. And finally, when you receive "syntax error, unexpected T_STRING", (or unexpected "}", ";", etc.), it usually means you have one too many of the unexpected character, OR you've left off a character that is required. In the case of "unexpected T_STRING", you usually are missing something immediately before the string, like a "." (dot) which tells php to add the two together. For example: $some_string_result = $some_string_variable . SOME_STRING_CONSTANT 'some string hard coded text'; The above code would produce the unexpected T_STRING error. It should be written like this instead: $some_string_result = $some_string_variable . SOME_STRING_CONSTANT . 'some string hard coded text'; It is important to remember that osc error messages are informative, and will tell you what to look for and where. In the case of "unexpected", the line number will not necessarily be the line with the missing/extra item, but you can start on that line and work your way towards the top of the file. The more you work with the error messages, the easier it gets to decipher them, and to find the error. As you can see, I've had a LOT of practice. :) Good luck, and let us know how it goes. -Skittles Thank you so much for getting back. I've managed to correct a whole load of problems now. I've hit one I'm not sure what to do about and I'm beginning to wonder if I should uninstall osCommerce and start again from scratch as I think I must have done something bad to get all of these problems. My current error message is: Template file does not exist: [includes/sts_templates/yummymummy/boxes/infobox_header.php.html] Fatal error: Call to undefined function: tep_has_category_subcategories() in /home/effortle/public_html/catalog/includes/boxes/categories.php on line 41 I think this is telling me that a file does not exist - not quite sure where that went! The Fatal effor is telling me I need to define a function I think in categories.php, but I'm not sure how to do that. Sorry, I'm not normally this bad :blush: Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.