jdessel Posted June 30, 2004 Posted June 30, 2004 My site's down and I can't fix it. Usually when I get this kind of error it just means I need to delete a few extra spaces at the end of the document and everything calms down but not this time. Right on my home page, there is suddenly nothing but this: Parse error: parse error in /home/snflwr/public_html/catalog/index.php on line 17 And here is some of what is in the document specified. I tried to bold Line 17 but it doesn't work if I'm already specifying the code tag: <?php /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) &amp;amp;amp;amp;&amp;amp;amp;amp; $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } Could someone please help me with this? I'm tearing my hair out! I tried removing all the spaces at the end of the document but nothing. I have no idea what else to look at. Thanks!
Guest Posted June 30, 2004 Posted June 30, 2004 compare your backup index.php with the one you are using, you will see the ampersands you have are messing with things. what did you modify?
jdessel Posted June 30, 2004 Author Posted June 30, 2004 I modified other pages but not index.php! I went through all the pages I modified and removed any excess spaces. I tried removing the ampersands but it made no difference. I'll compare to the backup next. Thanks for your help.
jdessel Posted June 30, 2004 Author Posted June 30, 2004 I seem to have fixed it doing exactly what you suggested. I restored a few pages from a backup. Thank you very much. I really appreciate your help with this.
241 Posted June 30, 2004 Posted June 30, 2004 yes the code should read && instead of the & this is sometimes caused by editing online using the file manager, there are several known issues with editing using the online file manager, it is better to use an ftp program such as ws_ftp to download the file and edit locally offline then ftp upload the file to the server. No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.