fix phpserver function