ShannonScott Posted June 19, 2011 Share Posted June 19, 2011 Fatal error: Cannot redeclare class oscTemplate in /home/.../public_html/includes/classes/osc_template.php on line 13 Can anyone help with this error code? I have reinstalled the file from back up and still get the same error. I am including the php code below. Please help!!! <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ class oscTemplate { var $_title; var $_blocks = array(); var $_grid_container_width = 24; var $_grid_content_width = 16; var $_grid_column_width = 4; function oscTemplate() { $this->_title = TITLE; Link to comment Share on other sites More sharing options...
germ Posted June 19, 2011 Share Posted June 19, 2011 There is nothing wrong with that code. The problem lies elsewhere. The keyword on the error is "redeclare". That means that file is being processed more than once. Check the /includes/application_top.php file. It should have this line in it ONCE: require(DIR_WS_CLASSES . 'osc_template.php'); And that file shouldn't be in a "require" or "include" in any other file. 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 More sharing options...
ShannonScott Posted June 19, 2011 Author Share Posted June 19, 2011 Thank you! I replaced the file from the backup and it works like a charm! I wouldn't have had any idea where to look without you help. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.