0

I have a php script setup on my centos server that does some video encoding, and I include that script in 4 other php scripts that I each run every few minutes (alternating minutes) via cron.

I have each cron set to email me when the scripts run and when there is output.

So, I have this odd situation where every once in a while, the results of the script are odd. It almost looks like an older iteration of the script is running, one that I fixed some time ago.

However, when this happens and the results of the video encoding come out this way, the email I get from cron is always odd too.

It comes to me as a blank attachment and the content-type of the email is as an application rather than text.

So, when this happens I am not able to review the output to see what went wrong.

It's very odd. I double-checked to be sure there wasn't an older version of the script or a different cron out there and I don't see any.

Is there any other explanation or anything I can do to try to track down what could be happening here?

  • Could cron start whilst the script is running, processing an incomplete result set? – suspectus Jul 29 at 7:30
  • @suspectus I don't /think/ so just because as soon as the script runs it tags the video as being encoded in the db so there won't be a conflict. The script does run and the video does get encoded, but it has one specific error/bug that I fixed some time ago and can't really be present anymore as, like I said, there is only one script actually running here as it is included in all of the other cron scripts, so either all encoded videos should have the bug or none should. Surely there is not some kind of cron cache I don't know about...(that sounds ridiculous) – CRAIG Jul 29 at 16:46
1

The first thing to check is the email. The email MIME type cannot be identified so defaults to "application". The script is generating output which violates the correct email format.

If you save the attachment and open it using a text or binary editor it may provide a clue. Hopefully it holds an error message.

You fixed a bug yet it appears to resurface occasionally. As you say there is no cron cache. There is no old version of the script on the system that can possibly cause this. Then two possibilities remain:

  1. There was an underlying cause for the original bug. The bug was fixed but the underlying problem remains and is causing issues with the current script.

  2. The two problems are entirely unrelated, and it's just coincidence that they product similar erroneous outcomes.

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.