MisterDobalina Posted November 11, 2004 Posted November 11, 2004 So now I'm getting: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/yellow3/public_html/advanced_search.php on line 176 On my advanced_search.php page. About the only thing I can think of that I changed was the image at the right top corner. A gif entitled table_search_results.gif or something like that. Changed the image to a bitmap file. I'd search it out on here, but the search on here is a little crappy, and you can only find 2 threads of info per search query. Weird.
Guest Posted November 11, 2004 Posted November 11, 2004 it helps us if you will post the 5 lines before and after the error, including the error line . . . that we we can help
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 it helps us if you will post the 5 lines before and after the error, including the error line . . . that we we can help <{POST_SNAPBACK}> Sorry. The 76 is where I counted the 176th line. $info_box_contents = array(); $info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 100%"')); $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1', true) . ' ' . TEXT_SEARCH_IN_DESCRIPTION); 76 new infoBox($info_box_contents); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
Guest Posted November 12, 2004 Posted November 12, 2004 yours: tep_draw_checkbox_field('search_in_description', '1', true) . mine: tep_draw_checkbox_field('search_in_description', '1') . here is my whole line: $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION);
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 yours:tep_draw_checkbox_field('search_in_description', '1', true) . mine: tep_draw_checkbox_field('search_in_description', '1') . here is my whole line: $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION); <{POST_SNAPBACK}> Actually, I just changed that part after my thingie was broken, so that's not it. Could you do me a favor and post the entire advaned_search.php code you have? I'll just copy it and paste it over my code, and see if that works.
Guest Posted November 12, 2004 Posted November 12, 2004 mine is heavily modified, you can download the source from here and then extract it.
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 Okay, thanks. I'm looking for it, but I can't find it. Can you link me? thanks for your help.
Guest Posted November 12, 2004 Posted November 12, 2004 on the main side of the oscommerce site, http://www.oscommerce.com/solutions
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 That's strange. I rewrote the virgin code to both advanced_search.php and advanced_search_results.php, and it's still coming up with that error message. The quick search was always working, it's just that advanced search. In my searching, it appears that the parse error might be server-based, so who knows? Thanks for the help.
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 Even stranger is that I changed the line on another site Original code: <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_1, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> To this: <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'anotherpicfile.jpg', HEADING_TITLE_1, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> And I get the parse error, line 176 thing. Now, I changed the anotherpicfile.jpg back to table_background_browse.gif, saved, and it is STILL messed up. I have a feeling that pic change is the culprit, but I don't understand why the parse error stays. Everything worked just fine before I temporarily changed it.
Guest Posted November 12, 2004 Posted November 12, 2004 The T_CONSTANT_ENCAPSED_STRING error is usually indicative of a missing semicolon somewhere on an earlier line. I do have a question though, line 176 from a clean install is a completely different line from the one you quoted: <td class="smallText"><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> <td class="smallText" align="right"><?php echo tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH); ?></td> ...which I think could easily generate the error if a \ got misplaced. Have a look and see what you got on that line, just an idea :)
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 The T_CONSTANT_ENCAPSED_STRING error is usually indicative of a missing semicolon somewhere on an earlier line. I do have a question though, line 176 from a clean install is a completely different line from the one you quoted: ? ? ? ? ? ?<td class="smallText"><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> ? ? ? ? ? ?<td class="smallText" align="right"><?php echo tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH); ?></td> ...which I think could easily generate the error if a \ got misplaced. Have a look and see what you got on that line, just an idea :) <{POST_SNAPBACK}> Okay. This is very weird. I have 2 sites on lunarpages, so I am using one as a guinea pig. Now, I just re-installed oscommerce on the site, and the advanced_search.php works just fine. The advanced search page comes up. Now...The odd thing is, when I open the code to edit the file under .../public_hmtl/oscommerce/advanced_search.php, I have the following code: <?php /* $Id: advanced_search.php,v 1.50 2003/06/05 23:25:46 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'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADVANCED_SEARCH); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript" src="includes/general.js"></script> <script language="javascript"><!-- function check_form() { var error_message = "<?php echo JS_ERROR; ?>"; var error_found = false; var error_field; var keywords = document.advanced_search.keywords.value; var dfrom = document.advanced_search.dfrom.value; var dto = document.advanced_search.dto.value; var pfrom = document.advanced_search.pfrom.value; var pto = document.advanced_search.pto.value; var pfrom_float; var pto_float; if ( ((keywords == '') || (keywords.length < 1)) && ((dfrom == '') || (dfrom == '<?php echo DOB_FORMAT_STRING; ?>') || (dfrom.length < 1)) && ((dto == '') || (dto == '<?php echo DOB_FORMAT_STRING; ?>') || (dto.length < 1)) && ((pfrom == '') || (pfrom.length < 1)) && ((pto == '') || (pto.length < 1)) ) { error_message = error_message + "* <?php echo ERROR_AT_LEAST_ONE_INPUT; ?>n"; error_field = document.advanced_search.keywords; error_found = true; } if ((dfrom.length > 0) && (dfrom != '<?php echo DOB_FORMAT_STRING; ?>')) { if (!IsValidDate(dfrom, '<?php echo DOB_FORMAT_STRING; ?>')) { error_message = error_message + "* <?php echo ERROR_INVALID_FROM_DATE; ?>n"; error_field = document.advanced_search.dfrom; error_found = true; } } if ((dto.length > 0) && (dto != '<?php echo DOB_FORMAT_STRING; ?>')) { if (!IsValidDate(dto, '<?php echo DOB_FORMAT_STRING; ?>')) { error_message = error_message + "* <?php echo ERROR_INVALID_TO_DATE; ?>n"; error_field = document.advanced_search.dto; error_found = true; } } if ((dfrom.length > 0) && (dfrom != '<?php echo DOB_FORMAT_STRING; ?>') && (IsValidDate(dfrom, '<?php echo DOB_FORMAT_STRING; ?>')) && (dto.length > 0) && (dto != '<?php echo DOB_FORMAT_STRING; ?>') && (IsValidDate(dto, '<?php echo DOB_FORMAT_STRING; ?>'))) { if (!CheckDateRange(document.advanced_search.dfrom, document.advanced_search.dto)) { error_message = error_message + "* <?php echo ERROR_TO_DATE_LESS_THAN_FROM_DATE; ?>n"; error_field = document.advanced_search.dto; error_found = true; } } if (pfrom.length > 0) { pfrom_float = parseFloat(pfrom); if (isNaN(pfrom_float)) { error_message = error_message + "* <?php echo ERROR_PRICE_FROM_MUST_BE_NUM; ?>n"; error_field = document.advanced_search.pfrom; error_found = true; } } else { pfrom_float = 0; } if (pto.length > 0) { pto_float = parseFloat(pto); if (isNaN(pto_float)) { error_message = error_message + "* <?php echo ERROR_PRICE_TO_MUST_BE_NUM; ?>n"; error_field = document.advanced_search.pto; error_found = true; } } else { pto_float = 0; } if ( (pfrom.length > 0) && (pto.length > 0) ) { if ( (!isNaN(pfrom_float)) && (!isNaN(pto_float)) && (pto_float < pfrom_float) ) { error_message = error_message + "* <?php echo ERROR_PRICE_TO_LESS_THAN_PRICE_FROM; ?>n"; error_field = document.advanced_search.pto; error_found = true; } } if (error_found == true) { alert(error_message); error_field.focus(); return false; } else { RemoveFormatString(document.advanced_search.dfrom, "<?php echo DOB_FORMAT_STRING; ?>"); RemoveFormatString(document.advanced_search.dto, "<?php echo DOB_FORMAT_STRING; ?>"); return true; } } function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l eft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get', 'onSubmit="return check_form(this);"') . tep_hide_session_id(); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE_1; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_1, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('search') > 0) { ?> <tr> <td><?php echo $messageStack->output('search'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 100%"')); $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION); new infoBox($info_box_contents); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> <td class="smallText" align="right"><?php echo tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="fieldKey"><?php echo ENTRY_CATEGORIES; ?></td> <td class="fieldValue"><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); ?></td> </tr> <tr> <td class="fieldKey"> </td> <td class="smallText"><?php echo tep_draw_checkbox_field('inc_subcat', '1', true) . ' ' . ENTRY_INCLUDE_SUBCATEGORIES; ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_MANUFACTURERS; ?></td> <td class="fieldValue"><?php echo tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_PRICE_FROM; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('pfrom'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_PRICE_TO; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('pto'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_DATE_FROM; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('dfrom', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, '' . DOB_FORMAT_STRING . '')"'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_DATE_TO; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('dto', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, '' . DOB_FORMAT_STRING . '')"'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Now, doing absolutely NOTHING, no changes, no anything, to the code, I save it. I get the same parse error message. Opening it back up, here's the code: <?php /* $Id: advanced_search.php,v 1.50 2003/06/05 23:25:46 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'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADVANCED_SEARCH); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript" src="includes/general.js"></script> <script language="javascript"><!-- function check_form() { var error_message = "<?php echo JS_ERROR; ?>"; var error_found = false; var error_field; var keywords = document.advanced_search.keywords.value; var dfrom = document.advanced_search.dfrom.value; var dto = document.advanced_search.dto.value; var pfrom = document.advanced_search.pfrom.value; var pto = document.advanced_search.pto.value; var pfrom_float; var pto_float; if ( ((keywords == '') || (keywords.length < 1)) && ((dfrom == '') || (dfrom == '<?php echo DOB_FORMAT_STRING; ?>') || (dfrom.length < 1)) && ((dto == '') || (dto == '<?php echo DOB_FORMAT_STRING; ?>') || (dto.length < 1)) && ((pfrom == '') || (pfrom.length < 1)) && ((pto == '') || (pto.length < 1)) ) { error_message = error_message + "* <?php echo ERROR_AT_LEAST_ONE_INPUT; ?>n"; error_field = document.advanced_search.keywords; error_found = true; } if ((dfrom.length > 0) && (dfrom != '<?php echo DOB_FORMAT_STRING; ?>')) { if (!IsValidDate(dfrom, '<?php echo DOB_FORMAT_STRING; ?>')) { error_message = error_message + "* <?php echo ERROR_INVALID_FROM_DATE; ?>n"; error_field = document.advanced_search.dfrom; error_found = true; } } if ((dto.length > 0) && (dto != '<?php echo DOB_FORMAT_STRING; ?>')) { if (!IsValidDate(dto, '<?php echo DOB_FORMAT_STRING; ?>')) { error_message = error_message + "* <?php echo ERROR_INVALID_TO_DATE; ?>n"; error_field = document.advanced_search.dto; error_found = true; } } if ((dfrom.length > 0) && (dfrom != '<?php echo DOB_FORMAT_STRING; ?>') && (IsValidDate(dfrom, '<?php echo DOB_FORMAT_STRING; ?>')) && (dto.length > 0) && (dto != '<?php echo DOB_FORMAT_STRING; ?>') && (IsValidDate(dto, '<?php echo DOB_FORMAT_STRING; ?>'))) { if (!CheckDateRange(document.advanced_search.dfrom, document.advanced_search.dto)) { error_message = error_message + "* <?php echo ERROR_TO_DATE_LESS_THAN_FROM_DATE; ?>n"; error_field = document.advanced_search.dto; error_found = true; } } if (pfrom.length > 0) { pfrom_float = parseFloat(pfrom); if (isNaN(pfrom_float)) { error_message = error_message + "* <?php echo ERROR_PRICE_FROM_MUST_BE_NUM; ?>n"; error_field = document.advanced_search.pfrom; error_found = true; } } else { pfrom_float = 0; } if (pto.length > 0) { pto_float = parseFloat(pto); if (isNaN(pto_float)) { error_message = error_message + "* <?php echo ERROR_PRICE_TO_MUST_BE_NUM; ?>n"; error_field = document.advanced_search.pto; error_found = true; } } else { pto_float = 0; } if ( (pfrom.length > 0) && (pto.length > 0) ) { if ( (!isNaN(pfrom_float)) && (!isNaN(pto_float)) && (pto_float < pfrom_float) ) { error_message = error_message + "* <?php echo ERROR_PRICE_TO_LESS_THAN_PRICE_FROM; ?>n"; error_field = document.advanced_search.pto; error_found = true; } } if (error_found == true) { alert(error_message); error_field.focus(); return false; } else { RemoveFormatString(document.advanced_search.dfrom, "<?php echo DOB_FORMAT_STRING; ?>"); RemoveFormatString(document.advanced_search.dto, "<?php echo DOB_FORMAT_STRING; ?>"); return true; } } function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l eft=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get', 'onSubmit="return check_form(this);"') . tep_hide_session_id(); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE_1; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_1, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('search') > 0) { ?> <tr> <td><?php echo $messageStack->output('search'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 100%"')); $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION); new infoBox($info_box_contents); ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> <td class="smallText" align="right"><?php echo tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="fieldKey"><?php echo ENTRY_CATEGORIES; ?></td> <td class="fieldValue"><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); ?></td> </tr> <tr> <td class="fieldKey"> </td> <td class="smallText"><?php echo tep_draw_checkbox_field('inc_subcat', '1', true) . ' ' . ENTRY_INCLUDE_SUBCATEGORIES; ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_MANUFACTURERS; ?></td> <td class="fieldValue"><?php echo tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_PRICE_FROM; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('pfrom'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_PRICE_TO; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('pto'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_DATE_FROM; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('dfrom', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, '' . DOB_FORMAT_STRING . '')"'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_DATE_TO; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('dto', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, '' . DOB_FORMAT_STRING . '')"'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> I noticed the size of the file changed about 200 kbs. Line 176 is as follows: $info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION); [line 176] new infoBox($info_box_contents); ?> </td> If you can spot what changed between the 1st and 2nd code, I'd appreciate it. It's very odd, but I bet the change in filesize has something to do with it.
Guest Posted November 12, 2004 Posted November 12, 2004 How are you editing this? Ignoring the slight difference in line numbers, mine has: <td class="smallText"><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> and yours has: <td class="smallText"><?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> Notice the missing backslashes, which leads me to think... are you editing the file using the admin file manager thingie? If so... bad idea, it doesn't handle the backslashes very well... better to edit in a text editor and FTP the file to where it's needed.
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 How are you editing this? Ignoring the slight difference in line numbers, mine has: <td class="smallText"><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> and yours has: <td class="smallText"><?php echo '<a href="javascript:popupWindow('' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></td> Notice the missing backslashes, which leads me to think... are you editing the file using the admin file manager thingie? If so... bad idea, it doesn't handle the backslashes very well... better to edit in a text editor and FTP the file to where it's needed. <{POST_SNAPBACK}> Yeah, I edited your suggestion, it seemed to work. I just now have a Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/crocky2/public_html/oscommerce/advanced_search.php on line 221 Which I'm assuming is another backslash. Didn't know it didn't handle backslashes well.
Guest Posted November 12, 2004 Posted November 12, 2004 Yeah, I edited your suggestion, it seemed to work. I just now have a Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/crocky2/public_html/oscommerce/advanced_search.php on line 221 Which I'm assuming is another backslash. Didn't know it didn't handle backslashes well. <{POST_SNAPBACK}> Just did a quick search, these are the last lines that will have the problem: <tr> <td class="fieldKey"><?php echo ENTRY_DATE_FROM; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('dfrom', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"'); ?></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_DATE_TO; ?></td> <td class="fieldValue"><?php echo tep_draw_input_field('dto', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"'); ?></td> </tr> Hope this all helps :)
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 Alright. I decided to just reset my site to re-install the codes. I didn't open the advanced_search.php file, I just saved it to my desktop, and uploaded it into the directory, and now I'm getting an Internal Server Error 404. What am I doing wrong now?
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 BTW, I uploaded using the file manager. Do I need to use an independent FTP?
Guest Posted November 12, 2004 Posted November 12, 2004 Alright. I decided to just reset my site to re-install the codes. I didn't open the advanced_search.php file, I just saved it to my desktop, and uploaded it into the directory, and now I'm getting an Internal Server Error 404. What am I doing wrong now? <{POST_SNAPBACK}> Can you just confirm that it's a 404? Internal server error code is usually 500 (404 is file not found).
MisterDobalina Posted November 12, 2004 Author Posted November 12, 2004 Can you just confirm that it's a 404? Internal server error code is usually 500 (404 is file not found). <{POST_SNAPBACK}> Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. -------------------------- Oh, 404 as well You recommend I open up my FTP and FTP it in there?
Guest Posted November 12, 2004 Posted November 12, 2004 Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. -------------------------- Oh, 404 as well You recommend I open up my FTP and FTP it in there? <{POST_SNAPBACK}> Yes, I'd always recommend FTP for uploading. If it doesn't work, download a fresh copy of osc from the oscommerce main site, and extract the relevant file from the zip file. Try uploading that instead. Keep a backup of your original though ;) If that still doesn't work, come back and we'll see what we can do.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.