|
Posted by Smiley on 01/25/07 01:18
Okay, I've already managed to track down this bug and fix it. But the thing
is, I'm not quite sure why it happened and it's left me scratching my head.
I was setting up some scripts to display videos embedded in a webpage. The
program does some writing to a database to store captions and such. For
some reason, though, the database writing wasn't working. I'd tested out
the functions in other scripts and they went just fine. I wasn't sure what
was going on. So I tested out the script by stopping it at certain points.
If I stopped the script right after it wrote to the database, then the
database was updated perfectly. So doing this I narrowed down the source of
my problem.
For some reason, the place at fault was much farther down in my code, and it
had nothing to do with database access whatsoever. It was a part of my
script that I set up to embed RealPlayer to play .rm or .ram clips. It came
down to this code (which is part of a larger string to embed the player):
<EMBED src='$videofile' width='$vidwidth' height='$vidheight'
loop='0' type='audio/x-pn-realaudio-plugin' controls='imagewindow'
console='video' autostart='0'>
The problem was that I put in the wrong variable instead of $videofile. So
the player didn't get the right filename and couldn't really play the video.
Once I corrected that, the database problem disappeared.
But how is this code connected to the database in any way whatsoever?? I
just don't get it!
[Back to original message]
|