Diddoo Posted September 22, 2009 Posted September 22, 2009 Hi All, some major catastrophes. I have moved a site I inherited from a previous host. site was created early 2006. not sure of the version of OSC old server was definately pre PHP5 and SQL5 , new host is version 5 for PHP and SQL i am now getting this error on the opening page. Parse error: syntax error, unexpected ';' in /home/xxxx/public_html/catalog/includes/header1.php on line 72 header1.php below. i believe it is non standard but it worked fine on the old site. Error is somewhere near <div class="fixcenter"> i think. <?php/* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // 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'); } if ($banner = tep_banner_exists('dynamic', '398x117')) { ?> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php echo tep_display_banner('static', $banner); ?></td> </tr> </table> <?php } ?> <div class="fixcenter"> <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 ; ?></a> | <?php } else { ?><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo ; ?></a> <?php } ?><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> <!--</table>!--> <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td> </tr> </table> <?php } ?> I am also getting this when i log into the admin section (it asks for credentials and then displays this once i hit return) The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Relative new user to PHP and managing a host.
knifeman Posted September 22, 2009 Posted September 22, 2009 i believe it is non standard but it worked fine on the old site. Error is somewhere near <div class="fixcenter"> i think. Using EasyEclipse for PHP, I found this code: <?php echo; ?> Twice in line 72. Not sure if this is the problem though. Tim
MrPhil Posted September 22, 2009 Posted September 22, 2009 You've got a section of code with some items missing: <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> Note that HEADER_TITLE_LOGOFF and HEADER_TITLE_MY_ACCOUNT are missing. My guess is that they weren't defined in one of the language files, so someone who had no idea what they were doing simply edited them out of this file. Also note that the old and new code (this is 2.2 RC2a) don't quite exactly match up, so I can't swear that those two macro names are the correct ones to use here. However, the echo ; in two places definitely is a bad thing. In your old PHP version, such a statement might be tolerated; apparently not in PHP 5. The '500' error could be a lot of things, including files uploaded improperly (binary mode instead of ASCII mode), blank or empty lines at the beginning or end, or permissions not allowed by your host, such as 777. The 404 error can be ignored (server looked for a custom 500 error handler and couldn't find one, so it had to use a default handler).
Diddoo Posted September 23, 2009 Author Posted September 23, 2009 Thanks guys. deleted both the <?php echo; ?> and the page loaded right up :) next page had same issue with header2.php...fixed that. guess i should start a new topic as i now have text showing up in german rather than english! thanks for your help!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.