I took your advice and did a completely new install. It wasn't that bad, I followed this tutorial: http://tanksoftware.com/tutes/installingphp.html. Everything went really well, and now MySQL works. Now, I have another problem. Here's the error I get now when I run it:
Warning: session_start(): open(/tmp/sess_e4bbdd21f7360f4517a73b87acf890d3, O_RDWR) failed: Permission denied (13) in /mnt/shared/game/php.php on line 2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /mnt/shared/game/php.php:2) in /mnt/shared/game/php.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /mnt/shared/game/php.php:2) in /mnt/shared/game/php.php on line 2
I checked the permissions on the /tmp folder, and they're 777.
I was about to post this when I got an idea. I set the session file that it was trying to access to 777 as well, and then it worked. That might be a temporary fix, but we'll see. For now, it works. Thanks for your help!