I have some ideas but I think you should head over there anyway.
But, my idea is that you could look in index.php and try to find out what it uses from the /php5/ and /php5/PEAR directories. It is possible that there is actually nothing used and you could safely get rid of the "include" and it still work.
On the other hand, it may actually need something from there but give you a different error, i.e. something that should be defined, a function or a variable, actually not being defined in which case it is likely a function or variable defined in some file in either /php5/ or /php/PEAR.
But, by at least getting past the "include/safemode" error you might then move on to a new error that might then tell you what in those included directories are needed.
If I am not making sense, it is because it is just after midnight here and I've had some Champaine to drink so I could blame it on that.
Happy New Year, by the way.