Fix problem with writing sessionwith php