zakya Posted July 2, 2007 Posted July 2, 2007 Hello everyone, Trying a Oscommerce template in my local computer ( windows xp sp2, IIS6, mysql 5.0 , php5 , phpmyadmin ). The installation was ok, but when I go to http://localhost/catalog/index.php ; the page is displaying with php codes in some areas. Par example under the Browse by Categories instead of the categories links these codes appears $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $categories['categories_id']; } $parent_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; reset($cPath_array); while (list($key, $value) = each($cPath_array)) { unset($parent_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name"); if (tep_db_num_rows($categories_query)) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $tree[$row['categories_id']] = array('name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false); if (isset($parent_id)) { $tree[$parent_id]['next_id'] = $row['categories_id']; } $parent_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $tree[$last_id]['next_id'] = $tree[$value]['next_id']; $tree[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } $categories_string .= ''; tep_show_category($first_element); $categories_string .= ''; echo $categories_string; ?> I know there is php parsing error but don't know where to look for these codes in order to correct. Please help. In advance thank you for your time. Sincerely, Zakya
zakya Posted July 2, 2007 Author Posted July 2, 2007 please help ! In which osc files control the browse by categories box? Why I am having hard time so solve this problem........?please help I am blue to php , let alone commerce. Thanks
spax Posted July 2, 2007 Posted July 2, 2007 In a stock installation, you would find that code in includes/boxes/categories.php. However, I have repaired one of these templates and it used the same code in includes/header.php so that is where you should start looking. Look for any short tags - <? instead of <?php - and make sure you have equal pairs. For every opening tag <?php you should have a closing tag ?> and vice versa.
zakya Posted August 23, 2007 Author Posted August 23, 2007 In a stock installation, you would find that code in includes/boxes/categories.php. However, I have repaired one of these templates and it used the same code in includes/header.php so that is where you should start looking. Look for any short tags - <? instead of <?php - and make sure you have equal pairs. For every opening tag <?php you should have a closing tag ?> and vice versa. Thanks and sorry for the late reply. I managed to sort it out. MySQL 5.0 + php 5 problem.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.