If all else fails, you can try commenting out the chdir() line.
Also, check your unix permissions - you need the executable bit set on all paths down to root from the public_html folder for the group. For example on mine I have:
Code:
drwxr-xr-x 9 forums forums 4096 Apr 11 06:48 forums/
and
Code:
drwxr-x--- 27 forums nobody 4096 Apr 11 07:39 public_html/
and obviously on /home too.
Hope this helps,
Delphy