Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error after Register_Globals 1.5a patch


HuanManwe

Recommended Posts

Hello,

 

I'm new on this but I've tried and find information about everything, but I can't solve this problem by myself.

 

Last week I was told to install an osCommerce on a Windows Server. First of all I had problems with register_globals as in the server I had to use they were disabled and that was the way it had to be. Later I had to give rights over some files and folders but had to talk to the administrator of the server to give them manually. I solved that issue too. But now...

 

it seems that the patch I applied to avoid register_globals has made a new problem. I can get into the admin section but when I try to see the shop itself (catalog) I get just this message:

 

Parse error: parse error, unexpected $end in C:\Inetpub\vhosts\solocarteles.com\httpdocs\tienda\includes\functions\general.php on line 1336

That line is the last one, so I guess the problem is there, because the last function is one of the register_globals_patch modifications:

// nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
 function tep_convert_linefeeds($from, $to, $string) {
if ((PHP_VERSION < "4.0.5") && is_array($from)) {
  return ereg_replace('(' . implode('|', $from) . ')', $to, $string);
} else {
  return str_replace($from, $to, $string);
}
 }
// >>> BEGIN REGISTER_GLOBALS
 // Work-around functions to allow disabling of register_globals in php.ini
 // These functions perform a similar operation as the 'link_session_variable'
 // function added to .../functions/sessions.php but for the GET, POST, etc
 // variables
 //
 // Parameters:
 // var_name - Name of session variable
 //
 // Returns:
 // None
 function link_get_variable($var_name)
 {
// Map global to GET variable
if (isset($_GET[$var_name]))
{
  $GLOBALS[$var_name] =& $_GET[$var_name];
}
 }

 function link_post_variable($var_name)
 {
// Map global to POST variable
if (isset($_POST[$var_name]))
{
  $GLOBALS[$var_name] =& $_POST[$var_name];
}
 }
// <<< END REGISTER_GLOBALS
?>

 

Can someone help me? I haven't found anything like this after searching in these forums.

 

Greetings,

 

Huan Manw?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...