CLMarble Posted August 3, 2010 Share Posted August 3, 2010 I have searched the forums with no matching issues. I have no idea what happened! I added the store_logo contribution and didn't TOUCH the application_top.php file, now I get the following message... Fatal error: Call to a member function add_current_page() on a non-object in /home/content/68/5228268/html/shop/includes/application_top.php on line 314 Please reply soonest! Cynthia Link to comment Share on other sites More sharing options...
chadcloman Posted August 3, 2010 Share Posted August 3, 2010 See this link. Check out Chad's News. Link to comment Share on other sites More sharing options...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 See this link. Your link gave me the fix I needed. THANKS! Now, I refresh and I get: syntax error, unexpected '<' in /home/content/68/5228268/html/shop/includes/header.php on line 64 This is line 64: <?php echo $breadcrumb->trail(' » '); ?></td> Doesn't look like there are any extraneous '<' hanging out. So confused. Still no store showing. Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 It could be in the code before line 64. Why don't you post the first 70 lines or so (and please enclose them in and tags). Check out Chad's News. Link to comment Share on other sites More sharing options...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 It could be in the code before line 64. Why don't you post the first 70 lines or so (and please enclose them in and tags). // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td> <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> <td align="right" class="headerNavigation"> <?php if (tep_session_is_registered('customer_id')) { ?> <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?> <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </tr> </table> Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 You seem to be missing some stuff at the beginning of the file. Where's the opening "<?php"? Check out Chad's News. Link to comment Share on other sites More sharing options...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 You seem to be missing some stuff at the beginning of the file. Where's the opening "<?php"? Here is the first 33 lines... <?php /* $Id: header.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // START STS 4.1 $sts->restart_capture ('applicationtop2header'); // END STS 4.1 /*** Begin Header Tags SEO ***/ // We include header_tags.php early on to make $header_tags_array available to subsequent scripts if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } $sts->restart_capture ('headertags'); /*** End Header Tags SEO ***/ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } Thanks for the assistance with this. The shop is completely gone! Cynthia Link to comment Share on other sites More sharing options...
MrPhil Posted August 4, 2010 Share Posted August 4, 2010 Is this the actual code: /*** Begin Header Tags SEO ***/ // We include header_tags.php early on to make $header_tags_array available to subsequent scripts if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } $sts->restart_capture ('headertags'); /*** End Header Tags SEO ***/ ? It should be /*** Begin Header Tags SEO ***/ // We include header_tags.php early on to make $header_tags_array available to subsequent scripts if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } $sts->restart_capture ('headertags'); /*** End Header Tags SEO ***/ I don't know if it's related to your "line 64" error, but it needs to be cleaned up. When I counted lines, I came up with line 64 being the middle one of: if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } , so something is odd here. Usually an "unexpected <" means that someone dropped HTML code into the middle of a PHP code section. PHP is going along happily interpreting PHP statements, when all of a sudden it runs into an HTML tag (starting with <) and doesn't have any idea what to do with it. My best guess would be that in the ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> immediately following, there's some invisible garbage keeping the ?> from being recognized as end-of-PHP-section. Try erasing the entire line ?> and typing it back in. Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 Cynthia, would you please post the first 70 lines in their entirety. After combining the two posts and deleting the overlap, my line 64 doesn't even come close to what you say it is in the original post. Check out Chad's News. Link to comment Share on other sites More sharing options...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 Cynthia, would you please post the first 70 lines in their entirety. After combining the two posts and deleting the overlap, my line 64 doesn't even come close to what you say it is in the original post. Just home from appointments... THANK you for this! Cynthia <?php /* $Id: header.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // START STS 4.1 $sts->restart_capture ('applicationtop2header'); // END STS 4.1 /*** Begin Header Tags SEO ***/ // We include header_tags.php early on to make $header_tags_array available to subsequent scripts if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } $sts->restart_capture ('headertags'); /*** End Header Tags SEO ***/ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . <td> tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); ?></td> <td align="right" valign="middle"><?php if ($cart->count_contents() > 0) { echo ' <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'cart_full.gif', HEADER_TITLE_CART_CONTENTS) . '</a>' ; } Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 Fix the problem on lines 18-20 that MrPhil found, then see if you still get the error (and what line it's on). Check out Chad's News. Link to comment Share on other sites More sharing options...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 Is this the actual code: /*** Begin Header Tags SEO ***/ // We include header_tags.php early on to make $header_tags_array available to subsequent scripts if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } $sts->restart_capture ('headertags'); /*** End Header Tags SEO ***/ ? It should be /*** Begin Header Tags SEO ***/ // We include header_tags.php early on to make $header_tags_array available to subsequent scripts if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } $sts->restart_capture ('headertags'); /*** End Header Tags SEO ***/ I don't know if it's related to your "line 64" error, but it needs to be cleaned up. When I counted lines, I came up with line 64 being the middle one of: if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } , so something is odd here. Usually an "unexpected <" means that someone dropped HTML code into the middle of a PHP code section. PHP is going along happily interpreting PHP statements, when all of a sudden it runs into an HTML tag (starting with <) and doesn't have any idea what to do with it. My best guess would be that in the ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> immediately following, there's some invisible garbage keeping the ?> from being recognized as end-of-PHP-section. Try erasing the entire line ?> and typing it back in. I took out the hard return to clean it up and make that stray line part of the above comments. There is still a '<' out of place. I'll keep working it! Thanks, Cynthia Link to comment Share on other sites More sharing options...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 Fix the problem on lines 18-20 that MrPhil found, then see if you still get the error (and what line it's on). Did that correction and the error still exists. C Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 Did that correction and the error still exists. On which line? Check out Chad's News. Link to comment Share on other sites More sharing options...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 On which line? Line 70 - <td> tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); ?></td> Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 Remove the <td> from Line 70: tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); ?></td> Check out Chad's News. Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 I don't know where you got this copy of header.php, but it has issues. Good luck on getting the store to work. Check out Chad's News. Link to comment Share on other sites More sharing options...
germ Posted August 4, 2010 Share Posted August 4, 2010 Open mouth. Insert foot. :blush: 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...
CLMarble Posted August 4, 2010 Author Share Posted August 4, 2010 Remove the <td> from Line 70: tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); ?></td> Whew! That solved it!! YOU'RE AWESOME! Cynthia Link to comment Share on other sites More sharing options...
chadcloman Posted August 4, 2010 Share Posted August 4, 2010 <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . <td> tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME); ?></td> Those lines are split. Make them one long line. But before you combine them, remove the <td> that's right before "tep_image". That is what's causing your problem. Check out Chad's News. Link to comment Share on other sites More sharing options...
CLMarble Posted August 5, 2010 Author Share Posted August 5, 2010 But before you combine them, remove the <td> that's right before "tep_image". That is what's causing your problem. Did that. Thanks. C Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.