See, this is what happens when you ask questions for other people. The permissions on the file were screwy, and the guy was teesting it from the command line as root in one instance, while from the web in another. Anyway, good old chmod fixed it.
Cheers.