Are you working with a version of php that is earlier than 4.4? If so this could be the reason you are having this problem since this function call did not exist until after 4.4.
To fix the problem you should replace the session_commit call that is on that line with this function:
session_write_close()
According to the php documentation this should do the same thing and is supported in versions 4.0.4 and up.