Results 1 to 1 of 1
Thread: Strange PDO related script error
Jun 28, 2007, 16:40 #1
- Join Date
- Nov 2004
- 0 Post(s)
- 0 Thread(s)
Strange PDO related script error
I'm sorry if the title is a little vague but I've been struggling to figure out a solution to this for the last uh... 36 hours or so
So I'll try to summarise and give as much info as possible to keep it clear.
I'm basically trying to build a site to allow for paid music downloads. Once it gets to the download page, I have a table listing the track(s) that have been bought using a download button but also on the side there is a link that allows for the track(s) to be downloaded as a zip archive.
Now both functions are defined in the same class "Order" being respectively downloadTrack() and downloadArchive(). All MySQL functions are taken care of by the PDO extention, the code runs under PHP 5.1.6. Both download actions trigger the opening of a separate page which forces the file to download. It calls a file download.php each with their specific query string to return the appropriate file.
Now the download of individual tracks work fine so there down't seem to be an issue there. The issue is with the zip archive. I've been doing several debug tests and came to the conclusion that the error occurs on the call of the first action done by the $db object. I say "action" because the error is the same whether I do a $this->db->query($sql) or a $this->db->prepare($sql). The sql calls for a $_GET value and for a Session variable, which also occurs on the track download function and I've managed to output it and it executed just fine in a phpMyAdmin query window so the error doesn't appear to originate from the query itslef.
After Googling lots (I don't think I've spent so much time trying variants of google searches) I've added a call for the exception attribute for PDO and eventually I managed to obtain the following error message in my error log:
Fatal error: Exception thrown without a stack frame in Unknown on line 0
The only thing I could think of is a problem with my $db object somehow but I'm not sure what would cause it.
I'm sorry this is starting to sound like a rant, I'll post snippets of code tomorrow when I head back in to the office but meanwhile if anyone has any suggestions for things to try to debug this thing, that would be most welcome.
Last edited by loupblanc; Jun 28, 2007 at 16:51. Reason: posted too soon