Wow...ok i finally figured out what was causing the problem, but have NO idea why it happened. The internal server errors were occuring, because one of the scripts had reset the permissions on every file inside the PM folder to 644. I reset them, and it worked great for 30 minutes or so. Then it started bombing again. I removed the IM hack and now all is well again, with no further problems.