(or the other way round, sorry, I’m grasping at straws now)
I came across a similar prob when starting out in *nix, and I kinda got round it by having a PHP script actually write a file say, test.php, then I could just edit it with vim and so on and it worked.
I had put this down to my own ignorance at the time, and figured it must have been a chmod/chown error on my part.
(safe mode enforces matched ownership requirements on files)
Also, check your include_path string very carefully, there are diffs between *nix / win32 handling of slashes, separators ( ; or : ) etc.
Try setting include_path at the script level with ini_set();