OXID eSales‘ support department often helps administrators that have issues when patching or updating OXID eShop to a latest release. I remember the days back when I was an OXID Partner and I once called support with this kind of problem. I was absolutely sure I had transfered every single file of the new software version. Well, support proved the opposite.
After I joined OXID I created the first version of a consistency checking tool labeled oxchkversion to never make this happen again. The tool worked pretty well, but had some issues itself. In the beginning, it could not detect the difference between an OXID eShop which was patched cleanly and a shop which was screwed up. For shops which were installed from scratch it worked well. For those which ran for longer, it detected more and more update errors on each patch/update. Of course, for the tool to be useful, something had to change.
We later defined these requirements for a new version of oxchkversion:
- It should detect reliably if a shop is a „clean“ installation or not – even if some files originated from earlier installations. As long as these files were not released anew, they have to detect as OK.
- The tool should give useful hints if mismatches were detected.
- It should catalogue everything which was released.
- It should create and maintain a database of checksums for each file easily and in one step during new releases.
With these requirements in mind, we started work on version 2, which we used only for testing purposes within our support department. Pretty soon, we knew what had to be improved and we started to develop a new major public release. The result: You can now download oxchkversion v3 for free at OXID eXchange.
The shiny new oxchkversion consists of three parts:
- A Web service which is queried for answers about specific checksums.
- A MD5 database which is hosted by OXID eSales. This database contains MD5 checksums of every piece of software we release for distribution.
- oxchkversion.php itself; all in one file.
How It’s Used
Version 3 of oxchkversion works just like v1 and v2: Just copy oxchkversion.php to the root directory of OXID eShop and open it in a browser (e.g. http://www.youroxideshop.com/oxchversion.php).
- It detects your eShop edition, version, and revision from OXID eShop.
- It collects all the files which reside in shop and computes MD5 checksums for each php and tpl file.
- It then connects to the webservice and transmits this information for each file:
- Filename to be checked
- MD5 checksum
- Version detected
- Revision detected
- Edition detected
When running oxchkversion, this is the kind of output it provides:
- If the checksum matches the shop edition, version and revision, a file is marked OK. When this happens, no other information is printed.
- If the checksum does not match shop but is recognized as part of OXID eShop, the file is marked version mismatch.
- If the checksum does not match shop but is known as a file which has been in shop at any previous time, it’s also marked as version mismatch. This means: Files which were in shop in ancient times but are not in there anymore are detected as version mismatch.
- Totally unknown files are ignored.
All files which were detected as not OK are printed out in a list. A details link leads to more information:
- MD5 checksum,
- from which package the file came from and
- what package contained a newer release of this file.
That’s it! I hope you like OXID’s consistency checking tool and it’s useful for your daily work with OXID eShop.