Your script outputs:
be8dbdc0e34a94d916f828c3cfea10f0
If I check the file with md5sum I get:
be8dbdc0e34a94d916f828c3cfea10f0
If I download the file myself I get:
be8dbdc0e34a94d916f828c3cfea10f0
So I donāt see the problem?
Are you repeatedly pressing F5 over and over so youāre triggering multiple downloads to run simultaneously and therefore to write to the same file? If so you will see md5 changing as multiple threads write at the same time.
As written, i think i have more then one Problem.
The Problem i donāt have on the Linux Version. Same as your result.
Maybe it is only on Windows/xampp
We donāt want a cache per instance of the item - we want a system wide cache - that is why we use the URL in the hash so that we donāt download the same temporary image if the feed is used in multiple layouts. Including the mediaId will give an assignment specific cache and still wont guarantee the single instance downloads (multiple players can reference the same layout).
flock / fopen
I thought that cURL would get a write lock on that file⦠but perhaps not, I canāt find anything conclusive either way.
I donāt see any harm in having flock implemented.
So if I install Win 7 (I donāt have access to 8 at the moment) and that XAMPP, and Xibo 1.7.3 and configure a player to talk to that CMS with that ticker feed Iāll see the issue?
I really donāt know. You donāt Need to try, i have to make more testā¦
Maybe related to Hardware, Network Hardware/Network Card or wireless Network, cable Network whaterver, i donāt know
Iāve got a Win7 machine setup with the same XAMPP and have managed to reproduce this in that setup. Iām not sure why though at this point.
I applied your proposed locking patch and if anything the problem got worse at that point.
With regard to the Android Player not liking the lg feed, itās because some of the images in there are around 34MB in size. Thatās more memory than weād be allocated on most devices so itās not possible for the Player to rescale an image that large.
Iām not sure why you would want to remove the FOLLOW_LOCATION Curl option?
That will break feeds that use a redirection when accessing the image (as I suspect the Nasa feed does since the image URLs are http://server/path/file.jpg?randomstring)
safemode is off, only open_basedir restrictionā¦
i wrote my provider if he is able to configure something. (and install ca-certificates)
Yes, safemode is off on xampp
And yes, that check is ok. since php 5.4 safemode is removed.
Locks in symfony (i donāt know if that is the problem, but a good reference https://github.com/symfony/Filesystem/blob/master/LockHandler.php)
As I said I applied your code and actually it made it happen more often.
I donāt think itās a locking problem because the files in the CMS library are fine and arenāt corrupt at all. If it was locking then theyād be corrupted.
Yes i know, i donāt know if my solution is correct, but on xampp i got md5 errors on my test-script. really donāt know, only had a look at the code, they write:
usleep(100); // Give some time for chmod() to complete
Yes i can confirm that. (Screenshots in first Post)
As said before, it is not so easy, i think i have multiple problems. Sometimes there was the wrong md5sum in the DB! For that i have written the new function. Maybe another problem.
I think I have located part of the problem - there is a concurrency issue whereby the CMS adds the same resource to the media table twice. That then causes the file to be downloaded by the player twice, with the second download overwriting the first one.
Iāve added a manual comparison to XMDS which will prevent those duplicates arriving at the Player, which should fix the effect, even those it doesnāt fix the cause.
Please ignore the removal of white space - not sure how the white spaces got in there, but they are gone now