Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Files becoming corrupt on server


stlcarolyn

Recommended Posts

Does anyone know why files on the server periodically become corrupt? It usually afftects .php files, but occasionally images files. My site is going to be moved to a new server shortly. I hope that will fix it, but does anyone know the cause so that I can try to avoid future problems?

 

Thank you!

 

Carolyn

Link to comment
Share on other sites

Does anyone know why files on the server periodically become corrupt? It usually afftects .php files, but occasionally images files. My site is going to be moved to a new server shortly. I hope that will fix it, but does anyone know the cause so that I can try to avoid future problems?

 

Thank you!

 

Carolyn

There is no reason why unless their hard disks are failing. Change hosts.

Link to comment
Share on other sites

Are you uploading these files with a FTP program? If so do you know what mode it is set to ASCII or Binary? If you have made no changes then sound like your host may have bad servers as stated above.

Link to comment
Share on other sites

Are you uploading these files with a FTP program? If so do you know what mode it is set to ASCII or Binary? If you have made no changes then sound like your host may have bad servers as stated above.

Good point, do not use IE to ftp files. Use a proper ftp client. Filezilla is a free one, cuteftp is not, and there are many others.

Link to comment
Share on other sites

I'm not sure what you mean by "corrupt", but it might be the result of improper "hacking" of your site.

 

There have been a few posts recently on this forum about osCommerce sites getting "hacked" into by nefarious entities looking to steal financial and personal information (most likely for fraud purposes).

 

I would look my files over very closely for malicious code because there's no reason for files to suddenly go "corrupt" outside of bad drives on the server or hacking attempts. Especially those you haven't changed recently.

:huh:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

does any one know how they are getting this malicious code into these sites ? Is there steps you can take to stop this ? Any info would be great regarding this matter.

Thanks

Link to comment
Share on other sites

Thank you for your help, that helps assure me that I'm not losing my mind!

 

I use WS_FTP Pro for uploading, and the files become corrupt after I upload them - uploading fixes them - so that can be ruled out.

 

All of my sites with my host are being moved at their request, so the hard drive failure theory makes the most sense to me. I was planning on changing the nameservers tonight.

 

If the problem resurfaces on the new server, then I will know to better what to be looking for - I sure do appreciate that!

 

To answer a question, by corrupt I mean that when I re-upload the files, when I notice a problem, the files are all slightly smaller in size than the last time I uploaded them. Often there is an error message visible on the site because something isn't working, but not always. That makes me think a little bit of data is missing out of each file.

 

I feel better now that I'm reassured that moving the site will help, and that all the work getting things working again will be worth it! Thank you all for your input.

 

Carolyn

Link to comment
Share on other sites

  • 2 weeks later...

Well, the problem has resurfaced on the new server, much to my horror. I reuploaded all the .php files on the site yesterday. This morning, they are slightly smaller in size if I re-upload them. But if I open them in a text editor and compare one from my hard drive and one from the server, they have the same number of lines in them and I can't tell any difference between the two. Yesterday I was ready to pull the plug on the whole site and donate my back inventory to charity. But I guess I'm more stubborn than that - I'm not quite ready to flush four years of work down the toilet yet! I'm going to start working my way through all the hacking references I can find and pass them along to the host, who is trying to help, and if there is anything I can do I'll try it. I'll let you know if anything works. Unless the hard drive on a brand new server is already failing, it's probably a hacking problem, right? I've never seen this happen on any other site in 10 years of making web sites for a living. It is bizarre.

 

Anyway, if anything works I'll let you know.

 

Thank you!

 

>If the problem resurfaces on the new server, then I will know to better what to be looking for - I sure do appreciate that!

>

>To answer a question, by corrupt I mean that when I re-upload the files, when I notice a problem, the files are all slightly >smaller in size than the last time I uploaded them. Often there is an error message visible on the site because something >isn't working, but not always. That makes me think a little bit of data is missing out of each file.

Link to comment
Share on other sites

Ok, I just got an email from the host saying they are giving up, I should use a different shopping cart. I don't want to do that since this site USED to work great. Can anyone recommend a host, since it looks like I have to either move the site again or shut it down?

 

Thank you!

 

Carolyn

Link to comment
Share on other sites

Ma'am...

 

If it's a UNIX server, the files won't be the same size because of how UNIX handles text files as compared to the way Windows/DOS handles text files.

 

It has to do with the <end of line> in the OS's.

 

Windows/DOS uses <cr><lf> ( return & line-feed ) at the end of each line of text.

 

UNIX uses <lf> (line-feed) only.

 

So, the files on the UNIX server will be slightly smaller than the same files on your Windows/DOS PC just because of the difference in how the two computers handle text files.

 

Does that help any?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Well, the problem has resurfaced on the new server, much to my horror. I reuploaded all the .php files on the site yesterday. This morning, they are slightly smaller in size if I re-upload them. But if I open them in a text editor and compare one from my hard drive and one from the server, they have the same number of lines in them and I can't tell any difference between the two. Yesterday I was ready to pull the plug on the whole site and donate my back inventory to charity. But I guess I'm more stubborn than that - I'm not quite ready to flush four years of work down the toilet yet! I'm going to start working my way through all the hacking references I can find and pass them along to the host, who is trying to help, and if there is anything I can do I'll try it. I'll let you know if anything works. Unless the hard drive on a brand new server is already failing, it's probably a hacking problem, right? I've never seen this happen on any other site in 10 years of making web sites for a living. It is bizarre.

 

Anyway, if anything works I'll let you know.

 

Thank you!

 

>If the problem resurfaces on the new server, then I will know to better what to be looking for - I sure do appreciate that!

>

>To answer a question, by corrupt I mean that when I re-upload the files, when I notice a problem, the files are all slightly >smaller in size than the last time I uploaded them. Often there is an error message visible on the site because something >isn't working, but not always. That makes me think a little bit of data is missing out of each file.

The difference in the file sizes may not be an issue, it may be because of the way the clusters are defined.

 

Apart from the file size, is your site working?

 

Is it all files, or only files of a type that are smaller?

 

A common element is your ftp program. You could use filezilla (free download) and see if the problem goes away.

Link to comment
Share on other sites

Ok,

 

Thank you thank you thank you. Here is what information I can provide.

 

1. I use WS_FTP pro for uploading. I don't think it's the FTP software, becuase uploading the files again is what fixes it. But maybe I'm wrong about that. I've used WS_FTP my whole career and never had an issue with it before. But I certainly don't know everything there is to know!

 

2. Sometimes the site works, and sometimes it doesn't. Sometimes the symptom of it not working is that I get a payment for an order in PayPal, but no order recorded in osCommerce. Sometime the symptom of not working is an error message, and when I re-upload the files the error message goes away. Whatever the symptom of a problem is, re-uploading the files fixes it, but only temporarily. It used to happen only every few months, so it was something I could kind of live with, now it is daily.

 

3. In ten years of making web sites for a living, I have never known a file to be a different size on the server than on my hard drive before. So that is new to me, and I assumed that was a bad thing because it happened with a site that kept getting broken, but maybe it isn't a symptom of something wrong and it's a coincidence. Like I said, I certainly don't know everthing there is to know. If that is a characteristic of the type of file that it is, that makes sense, because this is the only osCommerce site I've ever worked on. One of the reasons I did this site was to learn how to do it, and since I have started to build a successful business around it, I'd rather move it to another host than give up on it, and if there is another choice other than those two, such as get it working again where it is, that would be even better. So whatever I can learn I'm grateful for whatever anyone can tell me that might help.

 

4. Does anyone think that having quotation marks in my product descriptions could be an issue? I noticed when I moved the site, that moving the info in the database to the new server using phpMyAdmin was very successful except for the product descriptions cut off where there was a quotation mark. Could that somehow make parts of files not execute? Do the files get rewritten as part of the way osCommerce works, and when they get rewritten something gets cut off because of that?

 

5. Occasionally graphics files are affected (they have noise in them, or bands of wrong colors that weren't there before) but it's usually .php files that are affected.

 

Thank you!

 

Carolyn

 

The difference in the file sizes may not be an issue, it may be because of the way the clusters are defined.

 

Apart from the file size, is your site working?

 

Is it all files, or only files of a type that are smaller?

 

A common element is your ftp program. You could use filezilla (free download) and see if the problem goes away.

Link to comment
Share on other sites

The "caveat" with respect to file size is this:

 

The sizes will (?) only be different if you edit the file on your PC, then transfer it to the UNIX server.

 

If you use FTP to transfer files from the server to your PC, then the size will probably stay the same (maybe, maybe not).

 

If you have compared them line-by-line, and you don't see and added/removed/changed lines, then I wouldn't consider them "corrupt", just "different".

 

I would contend in that case, that it's just a difference on how the two computers are handling the files.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

The sizes will (?) only be different if you edit the file on your PC, then transfer it to the UNIX server.

That is the case for me and everything works.

 

There is a difference betweeen file size and size on disk.

Link to comment
Share on other sites

That is the case for me and everything works.

 

There is a difference betweeen file size and size on disk.

 

Thank you germ and Coopco - now I am convinced that the file size is a distracting coincidence and I can look elsewhere for the cause, that helps a lot, thanks!

 

I'll chalk the messed up graphics to the hard drive failure on the old server, and consider it a red herring.

 

That is really a big help, thank you!

 

Carolyn

Link to comment
Share on other sites

I have a problem with the upload of some images on my site. (Went up today).

 

It's the checkout button, english/german flag. If you peruse the site, you'll see what I mean. The images ARE present in the correct place on the server.

 

EXAMPLE -

http://www.ticklesticks.co.uk/login.php (Continue Button).

 

However, when using the direct link to them. The server complains of a 500 Internal Server Error -

http://www.ticklesticks.co.uk/includes/lan...on_continue.gif

 

I was thinking the that file tree was too deep perhaps?

I'm about to reupload the image by itself using CuteFTP Pro (Also used for ages without problems elsewhere!)

 

My host is streamline.net

Link to comment
Share on other sites

I have a problem with the upload of some images on my site. (Went up today).

 

It's the checkout button, english/german flag. If you peruse the site, you'll see what I mean. The images ARE present in the correct place on the server.

 

EXAMPLE -

http://www.ticklesticks.co.uk/login.php (Continue Button).

 

However, when using the direct link to them. The server complains of a 500 Internal Server Error -

http://www.ticklesticks.co.uk/includes/lan...on_continue.gif

 

I was thinking the that file tree was too deep perhaps?

I'm about to reupload the image by itself using CuteFTP Pro (Also used for ages without problems elsewhere!)

 

My host is streamline.net

The image is ok in both instances.

 

Click on the continue button in the first instance and you get this web address http://www.ticklesticks.co.uk/http://www.t...93go2jcpqqjtkp1

 

This would suggest that your configure php files are not correct.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...