Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't edit index.php


wonkotsane

Recommended Posts

I can't edit my index.php file. If I open it in the file browser and save without even making any changes I get the following error (line number varies):

 

Parse error: parse error, unexpected T_STRING in /homepages/2/d128375050/htdocs/catalog/includes/languages/english/index.php on line 32

 

Any suggestions?

Link to comment
Share on other sites

I can't edit my index.php file. If I open it in the file browser and save without even making any changes I get the following error (line number varies):

Any suggestions?

:( I have the posting right next to yours and have the same problem. I made an error somewhere in my html. if no one helps you I may be of some help but I am a newby myself. I had a functioning web site untill I made a couple minnor changes to my index page. If you don't have items in your contents page you could reload oscommerce, If you have a lot of time invested in product listing then we are in the same boat, I beleive if I was to reload oscommerce I would lose 100 hours of labor. kent.

Link to comment
Share on other sites

:( I have the posting right next to yours and have the same problem. I made an error somewhere in my html. if no one helps you I may be of some help but I am a newby myself. I had a functioning web site untill I made a couple minnor changes to my index page. If you don't have items in your contents page you could reload oscommerce, If you have a lot of time invested in product listing then we are in the same boat, I beleive if I was to reload oscommerce I would lose 100 hours of labor. kent.

 

Hi, this message is for both of you. I was in your shoe and I had to reload OSCommerce and started all over again. So I created a dummy store and re-loaded the OSCommerce file. I use this dummy store as my sort of backup for the original files in case I run into troubles of editing my website.

 

Listed below is an original script of includes/languages/english/index.php. (The OS Commerce version (2.2 MS2, newer version). You may copy & paste or upload in the same file. I hope my information helps you both out. Thank you. Kady

 

<?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', '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://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', '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');

}

?>

Link to comment
Share on other sites

:( I have the posting right next to yours and have the same problem. I made an error somewhere in my html. if no one helps you I may be of some help but I am a newby myself. I had a functioning web site untill I made a couple minnor changes to my index page. If you don't have items in your contents page you could reload oscommerce, If you have a lot of time invested in product listing then we are in the same boat, I beleive if I was to reload oscommerce I would lose 100 hours of labor. kent.

 

Kent, if you upload the original includes/languages/english/index.php, your website should be restored to normal except the main page will be the OS Commerce default page and you need to re-edit it....I think it's much easier than to re-invest 100 hrs. of labor... Thanks. Kady

Link to comment
Share on other sites

Thanks for the replies but I've tried these suggestions already. I don't even have to change anything - if I open the php file and save it without even making any changes and then upload it, it gives the error. Same applies to the file manager - if I open the file in the file manager, make no changes and click save it messes up.

 

I have tried using the file manager in osCommerce and also editing it in Notepad and uploading it again - same problem.

 

I have a backup so I can restore the file when it messes up but the default shop front is of no use to me whatsoever. If I can't edit the index.php I may as well give it up and find something else.

Link to comment
Share on other sites

Thanks for the replies but I've tried these suggestions already. I don't even have to change anything - if I open the php file and save it without even making any changes and then upload it, it gives the error. Same applies to the file manager - if I open the file in the file manager, make no changes and click save it messes up.

 

I have tried using the file manager in osCommerce and also editing it in Notepad and uploading it again - same problem.

 

I have a backup so I can restore the file when it messes up but the default shop front is of no use to me whatsoever. If I can't edit the index.php I may as well give it up and find something else.

 

I apologize for not being able to help you. I'm a newbie myself. Don't give up, it's a great software. I'm learning everyday. Maybe you would like to the review the contribution section and be able to find a solution. I hope the experience users will read your post so they can assist you better. Hang in there, someone will help you. Kady

 

Thanks for the replies but I've tried these suggestions already. I don't even have to change anything - if I open the php file and save it without even making any changes and then upload it, it gives the error. Same applies to the file manager - if I open the file in the file manager, make no changes and click save it messes up.

 

I have tried using the file manager in osCommerce and also editing it in Notepad and uploading it again - same problem.

 

I have a backup so I can restore the file when it messes up but the default shop front is of no use to me whatsoever. If I can't edit the index.php I may as well give it up and find something else.

 

 

Stuart, I had posted this same error message with my index.php scripts and Wendy James replied to me. Maybe you would like to review the posting and send a message to Wendy.

 

'PARSE ERROR, UNEXPECTED T_STRING, LANGUAGES/ENGLISH/INDEX.PHP ON LINE 17' - Thanks. Kady

Link to comment
Share on other sites

hi,

dont give up just yet

I am a newby too and it has taken me a month just to figure out how change the index page.

THis is how i did it....

start on the admin page, click on TOOLS. then DEFINE LANGUAGES, then INDEX.PHP.

now scroll down to...

 

<?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', 'This is a default setup .......

 

this is where you can define the main text.

You can delete from the T in this ( BUT you MUST leave in the ' as this lets the pragramme know where the text starts... ) down to......... the full stop after </b></font>. agauin you MUST LEAVE the '); as it tells the program where the text ends.

 

<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'

 

it would seem that if any thing outside of the ' ' is altered then you ve had it unless you can put it back to how it was. This is where i used the l script posted previously. but when cutting and pastin only highlight to the very last charachter and it should work.

i hope that helps

shaun_180

 

if you have any more questions on the altering the fron page email me at [email protected] ican help i shall

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...