Salz all !!

I recently switched to php5, and after rewritting my session handler I noticed the current directory switches to the apache2 dir. All the relative paths are then screwed.

What's the best aproach in dealling with this ?
I'm really, really iritated by this because I was expecting php5 to be stupid-bugs-not-appearing-in-php4-free .

Thanks...