Bizarre Situation, Bizarre Error
Posted on 2010-05-06 (Updated on 2019-02-16)
Update: The plot thickens!
Since I work for a County municipality, we have a lot of bizarre stuff going on behind the scenes. For instance, we have an ODBC connection set up so that I can display a bunch of FoxPro data on our web site using PHP. Weird situation, right? Well, it gets weirder...
A little while back, I started seeing an error pop up every once and a while: "Unable to create temporary work files". I scoured the net, but wasn't able to find anything that would explain the behavior we were encountering. Luckily, I added in some logging functionality and was able to reproduce the problem.
Since the FoxPro data came from a production system, I copied the database (just a collection of files) on to the web server, to prevent hammering the application server with web traffic, and to prevent any security holes from affecting production data. A quick script copies all of the relevant files to the web server at night, so it has something to work with... or so I thought!
It turns out that I forgot to copy one of the files, and therefore one of the tables, over to the web server. Whenever we tried to display a property that referenced that table, everything blew up quite spectacularly and threw that vague error message. After amending the copy script and running it to get the missing files, everything went off without a hitch.
I know this doesn't make for exciting news, but I wanted to throw it out there just in case someone else ran into this problem, and received an equally vague error message. It also serves as a warning to any would-be developers: make intelligent error messages!
Tags: php server sql