Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help please - Ive overwritten index.php file!


dave47

Recommended Posts

Posted

Hi all,

 

While doing some mods to my site, Ive accidentally overwritten my index.php file! :angry: I was actually trying to create a different home page. I thought that the file was different from the os index file. DOH!

 

Anyhow, is there any way I can re-install the correct file? If so which one is it, as there are 10 versions in the winzip file?

 

I dont have a problem with accessing /catalog/admin area, its just the main home page.

Posted

HI,

Whichever index.php file you were woking on simply upload a fresh one.

You only have one in you catalog directory

then each language folder has one

catalog / includes / languages / <language folder>

 

Regards

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

Thanks for your advice Nic, but your suggestion didnt work.

 

One of the index files is actually in the root folder. under /catalog/ I think this is the one thats giving me the problem. So I renamed it index1.php and copied what I thought was the correct code from the file /catalog/.index. As I dont have a catalog folder on the site, it was uploaded to the root.

 

When I opened the page in IE I got the normal os page as it was before the problem, except that I had this error message at the top of the page:

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/xxxxx/public_html/index.php:2) in /home/public_html/includes/functions/sessions.php on line 102

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/xxxxx/public_html/index.php:2) in /home/breaouk1/public_html/includes/functions/sessions.php on line 102

 

 

So Im lost as to what to do, short of re-installing the whole application. :angry:

Posted
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/xxxxx/public_html/index.php:2) in /home/public_html/includes/functions/sessions.php on line 102

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/xxxxx/public_html/index.php:2) in /home/breaouk1/public_html/includes/functions/sessions.php on line 102

 

So Im lost as to what to do, short of re-installing the whole application. :angry:

 

either this file, or one of the other files that you've changed has output html before the session could be started.

 

any time you get an error message like this, you can search the forum for the error message. in this case "headers already sent"

 

this error comes up a lot and there are plenty of suggestions on how to go about resolving the issue.

 

best of luck to you.

Posted

Thanks for the help Dave.

 

I found out what the problem was. When I cut & pasted the code, I pasted it to line 2, which created white space.

Archived

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

×
×
  • Create New...