Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

unexpected T_CASE in admin/modules.php


AndreaFahy

Recommended Posts

I am still configuring a new shopping cart. I would like to now configure the modules, but I receive this error:

 

Parse error: parse error, unexpected T_CASE in /home/httpd/vhosts/bonsaibirds.com/httpdocs/shop/admin/modules.php on line 56

 

This is what I have on line 56 of that php file:

 

case 'install':

 

 

 

Thank you in advance for any advice as I will be unable to work in the modules until this is rectified.

Kindly,

 

Andrea Fahy

Link to comment
Share on other sites

I am still configuring a new shopping cart. I would like to now configure the modules, but I receive this error:

 

Parse error: parse error, unexpected T_CASE in /home/httpd/vhosts/bonsaibirds.com/httpdocs/shop/admin/modules.php on line 56

 

This is what I have on line 56 of that php file:

 

case 'install':

Thank you in advance for any advice as I will be unable to work in the modules until this is rectified.

 

 

there seems to be a problem with your modules.php as case 'install' is in 51st line by default. check to see if there's

 

}

 

before case 'install'

Link to comment
Share on other sites

Here is a chunk of the code, I don't know how much would be helpful to see..

 

lines 51-72

 

$value = ereg_replace (", --none--", "", $value);
	  tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
	}
	tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
	break;
  case 'install':
  case 'remove':
	$file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
	$class = basename($HTTP_GET_VARS['module']);
	if (file_exists($module_directory . $class . $file_extension)) {
	  include($module_directory . $class . $file_extension);
	  $module = new $class;
	  if ($action == 'install') {
		$module->install();
	  } elseif ($action == 'remove') {
		$module->remove();
	  }
	}
	tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class));
	break;
}
 }

 

Does there need to be a } before case 'instal' ?

Kindly,

 

Andrea Fahy

Link to comment
Share on other sites

If you're still having problems, please post the contents of that file, up to this line:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

That would be all the PHP stuff at the beginning.

:)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...