Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error in my index file


Guest

Recommended Posts

Parse error: parse error, unexpected T_STRING in /home/fuzzymel/public_html/includes/languages/english/index.php on line 13

 

The only thing I did was open it, look at the code and then saved it. Now I can ot even access my site. I get the above error.

 

Does the php file have to be uploaded a certain way and not just saved through the oscommerce file manager save?

Link to comment
Share on other sites

Parse error: parse error, unexpected T_STRING in /home/fuzzymel/public_html/includes/languages/english/index.php on line 13

 

The only thing I did was open it, look at the code and then saved it. Now I can ot even access my site. I get the above error.

 

Does the php file have to be uploaded a certain way and not just saved through the oscommerce file manager save?

 

Hi,

I've found that it is best before doing anything...

Always back up the original file.

I open files in notepad then save them to my hardrive with the file renamed

to include an x like index.php would be renamed to to indexx.php

Then just in case things get messed up while tweaking

you can just upload indexx.php and then rename it to index.php again

and you will get back to where you started.

If you open a file in something other than notepad

sometimes the code can be altered.

I had the same problem at first. I can sympathize!

If you still have the downloaded osCommerce file

you could open it to a folder on your hardrive

then upload that index.php to replace the one you messed up.

It doesn't hurt to keep an extra copy of the files on your hardrive.

Hope this helps a bit! Good luck!

Link to comment
Share on other sites

Hi, I'm new to this but of what I've heard until now, dont use the Oscommerce File Manager - it corrupts your code, you should only use Notepad (currently searching for another option).

 

So do I copy the code to notepad then upload it to oscommerce via the File Manager or do I have to use Cpanel to upload it? I do not see a feature in File manager to change the name either.

Link to comment
Share on other sites

Yep, forget using the Filemanger editor altogether. Even copy/paste from your notepad to Filemanager ediotr then a save will mess up the file by droping escaped characters like what\'s becoming what's and causing a parse error in PHP defines.

 

Use any good local editor and the FTP to your site or if your cpanel has upload facilites use it also. The Filemanager has no "Save as" feature so you can't change the name.

 

HTH

Tom

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...