Most WordPress sites causing realpath errors

Looks like you are using one of the hacks to have the same wp-config.php file in development and deployment environments. AS it is noted at the end of that page, the hack were not tested in restricted environments like your. If you are not in development phase anymore then you should change your code in wp-config.php and manually set the constants instead of relying on location detection.