Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error in configuration.php(125) : eval()'d c


peteravu

Recommended Posts

I get this error after install http://www.oscommerce.com/community/contributions,1255/ on osCommerce 2.2MS2

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\programmer\easyphp1-7\www\catalog\admin\configuration.php(125) : eval()'d code on line

 

can anybody see a code mistake?

 

switch ($action) {
   case 'edit':
     $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');

     if ($cInfo->set_function) {
       eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');
     } else {
       $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value);
     }

Link to comment
Share on other sites

now i get error:

Parse error: parse error, unexpected T_DEFAULT in c:\programmer\easyphp1-7\www\catalog\admin\configuration.php on line 137 :(

 

switch ($action) {
  case 'edit':
    $heading = array('text' => '<b>' . $cInfo->configuration_title . '</b>');

    if ($cInfo->set_function) {
      eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');
    } else {
      $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value);
    }
  break;
  default: break;
}
     $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field);
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
   default:
     if (isset($cInfo) && is_object($cInfo)) {
       $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');

       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
       $contents[] = array('text' => '<br>' . $cInfo->configuration_description);
       $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added));
       if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified));
     }
     break;
 }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
   echo '            <td width="25%" valign="top">' . "\n";

   $box = new box;
   echo $box->infoBox($heading, $contents);

   echo '            </td>' . "\n";
 }
?>

Link to comment
Share on other sites

the problem was here:

eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');

replaced with

 $value_field = $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '"';  

 

 

(but) now in Shipping/Packaging-->Dimensional Weight-->edit theis is the text:

 

Please make any necessary changes

 

Dimensional Weight

Do you want to use Dimensional weight if it exceeds actual weight?

tep_cfg_select_option(array('true', 'false')""

 

update -- cancel buttoms and update don't work!!!

 

 

 

whay the tep_cfg_select_option(array('true', 'false')"" ????? and why don't update work?????

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...