Guest Posted December 11, 2003 Posted December 11, 2003 I am trying to change the inital welcome page index.php in english. Now I have had absolutly no luck at all. I started off deleting the sentance and replacing it with my sentance a hundred parse error on line 13 error messages later i installed os commerce again and copied a new index.php (i had already tried copying the whole of spanish or german index's but that still didn't work). At the very least i tried to add one word in the middle of the sentance. Lo and behold I still have that stupid line 13 error message. I changed no code at all, all i did was write my shop in the middle of the first sentance already there. This line 13 is slowly annoying me. What on earth can I do? Is it something really simple and i'm being silly? I presumed if i wanted to change the page wording i just put my text where the standard text was. i have neither added nor deleted any tags or code.
moonstone Posted December 11, 2003 Posted December 11, 2003 fazer6, show us your codes starting from a few lines before line 13, to a few line after. It could be due to an extra } or something along that line.
Guest Posted December 11, 2003 Posted December 11, 2003 OK so i've started off with this and the page works define('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. i changed permissions on the file and it still works i added 'my shop' after This is define('TEXT_MAIN', 'This is my shop a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br>< and now i have that line 13 error, literally all i have done is write my shop after 'is'
Noobish-n-stuff Posted December 11, 2003 Posted December 11, 2003 did you add any ' or " around my store?? if so, proceed them with a / like this: /'mystore/'
moonstone Posted December 11, 2003 Posted December 11, 2003 You should not have this problem at all. o.k., let me get this right. You have added the exact words my shop to the line, and not something like fazer's shop right? If you added something like fazer's shop, then you will have a problem as your ' already ended the define statement. To over come this you should type fazer\'s shop
Guest Posted December 11, 2003 Posted December 11, 2003 I started off with this is a default. Now initially i tried to delete that sentance and rewrite. but after no luck i thought don't mess with the start or the end in case i take away a vital full stop. So in the middle of this is a default i wrote my shop. That is all I did nothing more. Which is why I can't understand it.
moonstone Posted December 11, 2003 Posted December 11, 2003 what if you remove the words my shop now? Do you still get the same error message or it will all go away?
404 Posted December 11, 2003 Posted December 11, 2003 I have had a similar problem if i edit the index.php at all its like BAMM parse error on line 13 and im not trying to add any type of coding or anything just change the words like the default page says to.
Guest Posted December 11, 2003 Posted December 11, 2003 When I remove my shop I get the same error. When I then copy and paste the spanish version of the document I get the same error. When I delete the document and then copy from my original version (i have an original not messed around with version of os commerce now to make things quicker) it works fine. It just doesn't make sense to me. As soon as I make 1 change it stops working and won't ever start up again unless i copy an untouched version of the document. Surely everyone's changed the first page.
404 Posted December 11, 2003 Posted December 11, 2003 I think ive found the solution to the parse errors (yes there is more then that one) after looking through it more carefully i noticed that the light it was complaining about says something like " ' Let's see what we have here ' or something and notice the Let's has an <b>"</b> in it that is throwing it off then it complained about like line 21 and 25 i think which if you look at them a couple lines end in double <br>''</b> which is throwing it all off and there is another with one in the sentence i believe, this comes as default so im surprised it doesnt parse error by default but it only notices once you go to edit the top text i guess.
moonstone Posted December 11, 2003 Posted December 11, 2003 hmm, did you upload the files in ASCII or Binary? I'm not sure if this is the cause, but it could be. Just ensure that you FTP/upload the files in ASCII.
Guest Posted December 12, 2003 Posted December 12, 2003 i have absolutly no idea how i uploaded the files at all. my web hosting package comes with addon bits installed through fantastico. I am really new to all this and have never seen perl before, i know a bit of html because when i was 16 my dad helped me do my first web page, that was 7 years ago so i don't think there was really anything as fancy as dreamweaver. i literally just copied the code from a big book that could be used to keep doors open. now i guess i have to go back to hard coding again. I think i'd feel a little happier using html, well i'd do it in word and get word to create the code. Is it just the double <br><br> that's getting stressed about then 404? or the </b><br>, does that not turn off bold and then do a line break? what's wrong with that? OK so what can I get rid off then to make it work and put my own stuff in. I can take from define('TEXT_MAIN, ' but to where? I can't figure out where text main stops and other stuff starts. Can I take out everything up to just before the define table bits? And I can just bung in HTML and it's not going to get upset at me is it? So sorry to be such a damsel in distress, I seriously hate asking for help and being this pathetic, except when parking my bike and that's because it's too heavy for me to shove around. Normally i'd try to figure stuff out but this really did phase me.
Guest Posted December 12, 2003 Posted December 12, 2003 OK so i took out basically everything on that index page deleted from and including define text main thingy to just before the bottom where this starts define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); i copied and pasted something from word and now we've gone to a line 65 error this is what i've got so far so if anyone can see this error in line 65 i'd be so grateful if you could point it out. also if i only just installed this all the other day how did these errors get there even before i started fiddling around? <?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', ' <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 9"> <meta name=Originator content="Microsoft Word 9"> <link rel=File-List href="./This%20is%20my%20new%20site_files/filelist.xml"> <title>This is my new site</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>Authorised User</o:Author> <o:LastAuthor>Authorised User</o:LastAuthor> <o:Revision>1</o:Revision> <o:TotalTime>1</o:TotalTime> <o:Created>2003-12-12T14:24:00Z</o:Created> <o:LastSaved>2003-12-12T14:24:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>6</o:Words> <o:Characters>39</o:Characters> <o:Company>Lancaster University</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>47</o:CharactersWithSpaces> <o:Version>9.6926</o:Version> </o:DocumentProperties> </xml><![endif]--> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> </head> <body lang=EN-GB style='tab-interval:36.0pt'> <div class=Section1> <p class=MsoNormal align=center style='text-align:center'><span style='color:red'>This is my new site<o:p></o:p></span></p> <p class=MsoNormal align=center style='text-align:center'><span style='color:red'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></p> <p class=MsoNormal style='text-align:justify'><span style='color:fuchsia'>Look at the pretty colours<o:p></o:p></span></p> </div> </body> </html>') define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); 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_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'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'What's New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
moonstone Posted December 12, 2003 Posted December 12, 2003 define statement requires the content to be in single quotes. For example: define('TEXT_MAIN', 'My Shop') if you ever need to have another single quote within this pair of quotes, for instance, changing My Shop to My Brother's Shop, you will need a backslash to accomplish this. define('TEXT_MAIN', 'My Brother\'s Shop') Otherwise, define will take it that TEXT_MAIN = My Brother, and do not know what to do with the rest of the characters and gives an error. In your case, on line 65, you have the following line: <body lang=EN-GB style='tab-interval:36.0pt'> change it to: <body lang=EN-GB style=\'tab-interval:36.0pt\'> will solve your problem. Remember to add backslashes to the rest of the single quotes within the define statement. Let me know if I have made this clear enough. Note: a general rule is to have only two single quotes at the beginning and ending and the rest of the single quotes in between requires backslashes.
Guest Posted December 12, 2003 Posted December 12, 2003 ok so i've made it simple on the text front and couldn't add the backslash before the ' for some reason, i did it saved it and then when i went straight back in they werent there, repeated this a few times to be sure and then just deleted the ' to get them out the way. now i have an error on line 33, i tried deleting it but then it brings up an error on the next line. <?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', ' <html> <b> my shop<b> </html>'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); define('HEADING_TITLE', 'Lets See What We Have Here'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); 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'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Whats New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
Guest Posted December 12, 2003 Posted December 12, 2003 ok so i've made it simple on the text front and couldn't add the backslash before the ' for some reason, i did it saved it and then when i went straight back in they werent there, repeated this a few times to be sure and then just deleted the ' to get them out the way. now i have an error on line 33, i tried deleting it but then it brings up an error on the next line. <?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', ' <html> <b> my shop<b> </html>'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); define('HEADING_TITLE', 'Lets See What We Have Here'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); 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'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Whats New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?>
facasplaca Posted December 12, 2003 Posted December 12, 2003 Listen, I had a same problem, and someone on this forum helped me (thank you !). Upload index.php once more, original one. Then, open index.php in your dreamweaver or frontpage, do some changes, save it, and upload it again as index.php Sometimes if you change stuff online, thru catalog/admin, you can get errors without any particular reason. Try this, it works 100 %. If you don't know how to do it , sedn me your index.php and the text and I will prepaer it for you, no big deal.
Guest Posted December 12, 2003 Posted December 12, 2003 I've broken it completely now. when i try and open it in the browser it just comes up with the file manager view of lots of folders and files. i've put a new index in from my original untouched version as well. it's well and truly buggered. i've also tried to upload from my computer a version of this index and i'm still just getting the folders in the view.
Guest Posted December 12, 2003 Posted December 12, 2003 I've solved the problem, for my index.php. When I started with a new copy of index.php, I opened it with the Tool Admin - File Manager and made no changes, then I saved it, I started to get that parsing error immediately. The File Manager editor tool is adding some unknown characters somewhere and I can not find it. When I do make a correction by deleleting spaces or adding spaces...etc..I still get the same errors. So, I said "Heck with this" and I opened the index.php with Dreamweaver, did the editing on the index.php, saved it with Dreamweaver, then "put" to my remote server with the shopping cart. NO MORE ERRORS. The Tool Admin - File Manager is the problem! and it's adding unnecessary spaces or characters in the file being edited. I suggest using a different editor.
dchockenberry Posted December 13, 2003 Posted December 13, 2003 Simply do this: Save index.php to your computer Using Frontpage or some html editor, copy and paste all of the code in html view between define(TEXT_MAIN, ' and the '); before the New Products Line View it as "normal" - to edit it graphically so you can change the text, add images, etc. then view it again as html... copy and paste all that new code between those same 2 lines in the index file then reupload the index file
Guest Posted December 13, 2003 Posted December 13, 2003 Well from now on i'll make sure that i never edit anything online then. But i'm still having this little problem that when i try and view my catalogue online i just get the list of files, i don't get a parse error at least, but i don't actually get that file any more. i don't know whether it's easier to start all over again, i've put a few things in the catalogue so don't want to have to do that again, but also i don't have a clue how to even get this file back. it's sitting where it should in the file structure, but just doesn't show any more.
moonstone Posted December 13, 2003 Posted December 13, 2003 I know it's a pain to start all over. However, sometimes it's worth the effort to ensure that everything is done right, and will work right for the long run. I suggest you first take a look at the Wiki on New Installation, and follow the steps to ensure that everything is installed the correct way. Good luck! :lol:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.