andiauld Posted December 30, 2005 Share Posted December 30, 2005 Hi there This is the first time I have posted to the forums, so apologies if I'm posting in the wrong place. I thought I was slowly getting the hang of it, and then today I managed to mess up my index.php file, and I can't work out where I went wrong - I have an unexpected T_string in line 63 - can anyone point me in the direction of the original file content, so I can go through it line by line to find my error? I know, I know, I should've backed up, but I was doing some really simple editing, and trying to save time - learned my lesson now, as have wasted the last 6 hours trying to sort the mess out. I'm sure it's really simple to fix, so if anyone can quickly spot the error, then I will be eternally grateful... Regards Andrea It's fine up til this bit: The text is set in the following manner:<br><br><nobr>define' and then it goes wrong somewhere here: ('TEXT_MAIN', '<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>');</nobr><br><br>The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define('TEXT_MAIN', '');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://wiki.oscommerce.com" target="_blank"><u>osCommerce Wiki Documentation Effort</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'Welcome to Luscious Lingerie!'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 ''); define('TEXT_NOW', '' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'What's New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2005 Share Posted December 30, 2005 It would be easier for me (I use Beyond Compare) if you included your entire file. Is it too late to reload the original file and start over? Link to comment Share on other sites More sharing options...
♥Vger Posted December 30, 2005 Share Posted December 30, 2005 It would be much easier to reload an original, unedited file, and then to stop using the osCommerce File Manager to edit the file. There is now an updated version of osCommerce 2.2 MS2 available by following the "Latest News" link on the forum homepage. Amongst other things it includes a fix for the File Manager problem - so either use the updated version of MS2 or stop using the File Manager in your version. The default File Manager uses a PHP command called 'stripslashes' and it does just that and strips essential backslashes from in front of apostrophies. You don't even have to edit the file - just clicking the 'Save' button will remove the apostrophies. So, for future reference - whenever an apostrophy is used in text between the opening and closing php apostrophies then those new apostrophies must be 'escaped' with a preceeding backslash, as in: Let's = wrong Let\'s = right Vger Link to comment Share on other sites More sharing options...
andiauld Posted December 30, 2005 Author Share Posted December 30, 2005 It would be easier for me (I use Beyond Compare) if you included your entire file. Is it too late to reload the original file and start over? Hi there yes I would reload the original file if I knew where to find it .. I am a real novice at this, and I was actually starting to build up a bit of confidence that I might be able to see it through to completion. Now I have another problem (see below). Andrea Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2005 Share Posted December 30, 2005 Hi there yes I would reload the original file if I knew where to find it .. I am a real novice at this, and I was actually starting to build up a bit of confidence that I might be able to see it through to completion. Now I have another problem (see below).Andrea http://www.oscommerce.com/solutions/downloads Link to comment Share on other sites More sharing options...
andiauld Posted December 30, 2005 Author Share Posted December 30, 2005 Hi you're going to think I'm a TOTAL no-brain now ... I went into the news link from the forum homepage and got instructions to fix parse errors on line 148 in catalog/admin/filemanager. Seemed simple enough, so I went into file manager and made the changes. Worked okay, but apparently you also have to update Contact Us Form XSS Issue aswell, so I made the necessary changes there also, but now I'm getting a Parse Error of unexpected $ at line 251, and I don't know how to fix it. Re. your advice, I wasn't sure how to update the full version onto my site (like I said, I'm a complete novice, can do a bit of HTML and not much else, but I have been gradually learning through trial and error.) Can you give me any help to get back on track? Thanks in advance. AndreaI Link to comment Share on other sites More sharing options...
andiauld Posted December 30, 2005 Author Share Posted December 30, 2005 Hi again you are a lifesaver - I think I am just over-tired, otherwise I would have remembered where to download files from. Now I know what files to overwrite and stuff, I'm really panicking because I can't get into even the admin area of my site anymore, because there is just a permanent parse error warning. PLEASE tell me I haven't lost everything??? I backed up my database yesterday, but how do I get back into my shop area???? Please Help!!!!! II think I am going mad..... Andrea Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2005 Share Posted December 30, 2005 Hi again you are a lifesaver - I think I am just over-tired, otherwise I would have remembered where to download files from. Now I know what files to overwrite and stuff, I'm really panicking because I can't get into even the admin area of my site anymore, because there is just a permanent parse error warning. PLEASE tell me I haven't lost everything??? I backed up my database yesterday, but how do I get back into my shop area???? Please Help!!!!! II think I am going mad.....Andrea What is the error message? Link to comment Share on other sites More sharing options...
andiauld Posted December 30, 2005 Author Share Posted December 30, 2005 Parse error: parse error, unexpected $ in /data/members/paid/l/u/luscious-lingerie.co.uk/htdocs/www/admin/includes/functions/html_output.php on line 251 Thanks for getting back to me again - the above is what I get whether I try to access site or admin panel - how am I supposed to overwrite faulty files with original files if I cant get into admin panel??? Andrea Link to comment Share on other sites More sharing options...
Guest Posted December 30, 2005 Share Posted December 30, 2005 Parse error: parse error, unexpected $ in /data/members/paid/l/u/luscious-lingerie.co.uk/htdocs/www/admin/includes/functions/html_output.php on line 251 Thanks for getting back to me again - the above is what I get whether I try to access site or admin panel - how am I supposed to overwrite faulty files with original files if I cant get into admin panel??? Andrea That's part of the problem. Do not use the file manager to edit your files. Also, back up any file you want to modify so you can restore the original if the modification does not work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.