Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Small suggestion + script
#1
I was trying to setup my skin today and after hours of trying to find why I couldn't change my skin I found out 2 or 3 files weren't uploaded onto the ftp.
So I has an idea for a script, which i already wrote. Could be implented at the start of the installation.

You press a button and the process goes through a list of file paths, then echo's the results back on the screen, saying if the file exists or not.

Demo: http://ignition-gaming.net/forum/checker.php
(only a small demo for 2 scripts)

Suggestions? Opinions?
Yes, it's true. I'm Hiro Nagamura
#2
And a better way would be to include an Checksum checker. To see if the files are legit straight from the package. Mods should appear after install anyways..
#3
It would be to hard of work to make sure everything was there. Some servers would overload very quickly during the process.
-Doug
1scream Founder
Former MyBB Developer & SQA Member
My Twitter
#4
Yes, and no. I mean even with this it isn't full proof and well will most likely make it take even longer that you uploaded it wrong. As I've had times where things uploaded but well their size was a whopping 0!

Now this would say they are there so I would never think of reuploading them.
#5
(2008-12-15, 12:23 AM)NetSage Wrote: Yes, and no. I mean even with this it isn't full proof and well will most likely make it take even longer that you uploaded it wrong. As I've had times where things uploaded but well their size was a whopping 0!

Now this would say they are there so I would never think of reuploading them.

That's why you need checksum checker. Checks if it's the same file.

About overloading the server - shouldn't be a problem if done right. And there's no need to check images and stuff like that.
#6
This user has been denied support. This user has been denied support.
Main problem with checksum checking is that text mode FTP transfers mess with the files, some systems use \r\n for linebreaks others just \r or just \n. Tools like md5sum (Linux utility for creating and verifying lists of files + checksums) have an option -t for text files that make it ignore linebreak differences. PHP's md5() md5_file() etc. do not have this feature.

Regarding load, MyBB codebase isn't huge, checking all files (including all images etc) in the archive takes less than 1 second on my system. So with a pre generated list of all correct checksums (no matter what kind of linebreaks) it would be possible.

Then again it would be a much better solution in general to get a FTP server that works reliably and a FTP client that reports errors properly or at least that has a resume reupload feature or some other means to make sure that everything was uploaded properly.

After all you can get the very same issues by uploading only half a plugin or something.
#7
We plan to build support for this in to 1.6. Don't worry about new line differences and any other problems, we have all of this sorted already Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)