[eluser]Joshua Logsdon[/eluser]
Wow, great find! I recently had issues when Codeigniter created files (as apache user) in files I uploaded to the server (as a different server user). So I wonder if there is some of weird file permissions issue going on.
I believe realpath() will be empty (or rather FALSE) if the path is invalid. If you are on a virtual host, maybe there is some issue with paths or aliasing... for some reason the path may not be resolving correctly.
Sorry it's not a clear issue... makes me long for a missing semi-colon instead of anonymous server issues.