Guest Posted March 20, 2006 Posted March 20, 2006 Hi there I am a complete novice and I was having a little mess around with my website and have managed to copmplety mess it up, It now reads that there is an error on line 19, I went to includes-index php and this is a copy of the info I have <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', '<b></b> <font color="#f0000"></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', 'Let's See What We Have Here'); 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'); } ?> Can some one tell me what to put, or where I have gone wrong. HELP min
custodian Posted March 20, 2006 Posted March 20, 2006 define('HEADING_TITLE', 'Let's See What We Have Here'); You can NOT use an ' by itself it must be Let\'s see PHP take the ' as part of the programming. You must tell PHP not to use it, but to take it literally as it is.. ANY time you use an ' as part of a grammatical sentance structure you must proceed it with an \ Like this define('HEADING_TITLE', 'Let\'s See What We Have Here'); My Contributions Henry Smith
kgt Posted March 20, 2006 Posted March 20, 2006 Do not use the File Manager in the admin section to modify your files. Use a text editor and an FTP program to download/upload files between your PC and the server. Restore this file from the version in your installation files (in the zip file). Contributions Discount Coupon Codes Donations
warrenerjm Posted March 20, 2006 Posted March 20, 2006 Do not use the File Manager in the admin section to modify your files. Use a text editor and an FTP program to download/upload files between your PC and the server. Restore this file from the version in your installation files (in the zip file). I use my file manager to modify my files. I can't get my head around the FTP. I downloaded a copy of the shop, as backup & some files were the new ones & some were still as default, but my siteis showing as all new? It works the same, but I do keep a copy of what I amend. I made the same mistake as the one above & after reading for a whole day found out about the \' rule. I learn something new everyday.
custodian Posted March 20, 2006 Posted March 20, 2006 I use my file manager to modify my files. I can't get my head around the FTP. I downloaded a copy of the shop, as backup & some files were the new ones & some were still as default, but my siteis showing as all new? It works the same, but I do keep a copy of what I amend. I made the same mistake as the one above & after reading for a whole day found out about the \' rule. I learn something new everyday. File manager use should be used only when you absolutely do not know how, or are unabelt o do it any other way. The File Manager works, it just that it tend to mess up the files. Adding line feeds ^M fo the end of all the lines. Usually when I edit files that have these in them (using vi) I simple use :%s/^M//g which will remove all of them. I was thinking of writing a contirbution to add on to the file manager that would do this automatically. Just haven't had the time yet. And of course this would be for UNIX, not sure if a Win server has a VI editor. My Contributions Henry Smith
warrenerjm Posted March 21, 2006 Posted March 21, 2006 File manager use should be used only when you absolutely do not know how, or are unabelt o do it any other way. The File Manager works, it just that it tend to mess up the files. Adding line feeds ^M fo the end of all the lines. Usually when I edit files that have these in them (using vi) I simple use :%s/^M//g which will remove all of them. I was thinking of writing a contirbution to add on to the file manager that would do this automatically. Just haven't had the time yet. And of course this would be for UNIX, not sure if a Win server has a VI editor. Hi Henry I don't quite understand what you mean. I don't have any added stuff on the ends of lines? I am trying to get my head round Filezilla, & am doing some through this, but I am not just learning about OSC, but php, html,FTP etc aswell, so I am slow, but getting there. Thanks for your advise though. Julie
Guest Posted March 21, 2006 Posted March 21, 2006 I have tried your suggestions, and it has not helped, it went from an eror on line 19 to line 33 then back to 19. does any one know where I can find the file so I can start again.Help
custodian Posted March 21, 2006 Posted March 21, 2006 I have tried your suggestions, and it has not helped, it went from an eror on line 19 to line 33 then back to 19. does any one know where I can find the file so I can start again.Help No.. you only did half of what I suggested. You fixed the line I indicated, but I also said Any place the ' is used as part of a sentence, it must be \' ========================== Line 37 define('HEADING_TITLE', 'What's New Here?'); What's must be What\'s ========================= Line 33 (as in your error) define('TEXT_NOW', '' now'); To many ' It needs to be one of two ways define('TEXT_NOW', '\' now'); define('TEXT_NOW', 'now'); I'm assuming the extra ' in there was accidental, therefore the second lins is probably what you want. My Contributions Henry Smith
custodian Posted March 21, 2006 Posted March 21, 2006 I have tried your suggestions, and it has not helped, it went from an eror on line 19 to line 33 then back to 19. does any one know where I can find the file so I can start again.Help When you open the file again is your \ that you put in there gone? put all the \'s that need to be in there, save the file and don't open it again. See if your error goes away. Better yet, reqord the sentences so that the sentences don't have a ' in them What's new here changed to New Products (or whatever) My Contributions Henry Smith
jdez Posted March 21, 2006 Posted March 21, 2006 I don't know if this helps because I don't know much about OSC yet since I finally got it installed and working yesterday. But I was running into a similar error message regarding line 19 of the doc you mentioned. - I could not conect to MySQL It turned out to be a problem with at hosting company. They fixed it by running the install at their end. The person I worked with had a lot of experience with OSC and did not know why the problem was occurring when I tried to set everything up remotely. Maybe not helpful, but I thought I would mention it.
Guest Posted March 21, 2006 Posted March 21, 2006 Hi there I have tried what you sais and have removed the extra ' I also put in the \ where needed but there is still an error. The \ do vanish when I go back to the file. I have no Idea what to do. I am so rubbish at this sort of thing-I should of left it alone to start with. Is there anywhere I can get a basic front page file, so I can start from the beginning?
jasonabc Posted March 21, 2006 Posted March 21, 2006 stop using FrontPage. It's notorious for removing and changing bits of code. It's doing this to you already by removing the backslashes you have inserted. You're making your life a hundred times more difficult by using it. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
kgt Posted March 21, 2006 Posted March 21, 2006 Is there anywhere I can get a basic front page file, so I can start from the beginning? From oscommerce.com maybe? http://www.oscommerce.com/solutions/downloads I still suggest not to use the File Manager that comes with OSC. Text editors and FTP programs are designed to do this kind of stuff. Contributions Discount Coupon Codes Donations
Recommended Posts
Archived
This topic is now archived and is closed to further replies.