This is a discussion on HELP! Can't modify index.php, parse error 13 within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I have encountered a strange, and insurmountable problem with my oscommerce shopping cart. I installed the oscommerce shopping cart in ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I have encountered a strange, and insurmountable problem with my oscommerce shopping cart. I installed the oscommerce shopping cart in a folder named "oscommerce". As advised, there is a default welcoming file I am trying to edit located at in ../oscommerce/includes/languages/english/index.php This file works, as it came with the oscommerce install. However - I am unable to modify it successfully because I am receving a parse error. EVEN when I take the same file (that works) "index.php" and upload it as it is, I still receive a parse error when I try to view it. It's the same file even, but it seems there is some strange problem. Perhaps with the uploading of this file (or any file?).. could it be the oscommerce software, a server receival problem, my lack of knowledge of php files, permissions somewhere... Again the error message, when I upload the same, unchanged file even, is: Parse error: parse error in ../oscommerce/includes/languages/english/index.php on line 13 The code is " <?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 (c) 2003 osCommerce Released under the GNU General Public License */ 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>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> " I've tried allowing all the read/write/execute permissions for the file and the "english" folder.. tried the tools/filemanager edit and also by uploading a notepad edit. Haven't other people experienced this, can anyone help please, I'd love to have my shopping cart up soon, Desperately searching for help, Thanks Isaac |
| Sponsored Links | ||
| ||
| |
|
#2
| |||
| |||
| your code is missing either a space, a ' or " or maybe even ; so heres the code have for line 13. So delete yours and put this is in. 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>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>'); |
|
#3
| ||||
| ||||
| The short of it is replace the end of that line: background</span> " And change to: background</span> color.<br><br>'); Wrong type of Quote and missing the ending bracket and semi-colon.
__________________ JPF - osCMax Fourm Moderator Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#4
| |||
| |||
| Thanks for the replies, but still a problem I am hoping can be solved.. Perhaps the code isn't the problem because When I take the same, working code as it was given in the install index.php and I save it (through Tools/filemanager) OR I upload it again AS IS via notepad upload to the server.. I still get that parse error on line 13, but I haven't even made any modifications to the file?! It seems the error comes out when I just upload.. Because this code that came with the install IS working when I view it. But when I save it, it doesnt work. Here is the code again anyway..maybe this version is bad or something I don't know..permissions for both the file and the folder 'English' were allowed for read write and execute for all even.. hmm.. here is my code again (as it came unzipped/installed for the index.php file) (The double quote was my edition to this post) : __________________________________________________ ______ <?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 (c) 2003 osCommerce Released under the GNU General Public License */ 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>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' . ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define('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://forums.oscommerce.com" 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', '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'); } ?> __________________________________________________ _ This is the entire code for the file, as it was written in my "oscommerce" oscommerce/includes/languages/english/index.php This code that came with the install works when I view it. Again, this is the code that came with the install, and without even modifying it, just uploading it again as is creates a parse error 13; so, I can't even modify the code without receving the same parse error. If it is not a code problem why did I list it? Well, just in case someone out there recognizes this code/version and has some experience or knowledge with this version or install. I would greatly appreciate anybody's help! Thanks to all for trying, sincerely, Isaac |
|
#5
| |||
| |||
| Quote:
Quote:
|
|
#6
| |||
| |||
| Hi again, thanks for the consideration of the former problem, I managed to get around it by editing the index.php with the server's control panel's edit function. Don't know why the other editing techniques cause a parse error.. |
|
#7
| ||||
| ||||
| It MAY be your editor - like edit.exe (DOS/Windows command line) or Notepad or Write - these ALL could add a blank lines to the end of the file - which PHP does not like (which causes the SAME parse error). Use a REAL TEXT editor - like NoteTab(freeware) or UltraEdit (lowcost shareware). Good Luck
__________________ JPF - osCMax Fourm Moderator Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#8
| |||
| |||
| Agreed. |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parse error: parse error, unexpected T_NEW, expecting ')' | oscnoob | osCMax v1.7 Discussion | 0 | 04-02-2005 02:27 PM |
| Parse error help | brt | osCommerce 2.2 Installation Help | 3 | 12-31-2004 02:47 PM |
| New Installation Parse error: parse error, unexpected T_STRI | Anonymous | osCMax v1.7 Installation | 5 | 07-09-2004 07:06 AM |
| Parse error: parse error for product_listing.php | midwestwebsites | osCMax v1.7 Discussion | 1 | 09-16-2003 02:21 PM |
| Parse error: parse error, unexpected T_STRING? HELP... | hanool | osCommerce 2.2 Modification Help | 1 | 09-10-2003 11:38 AM |