bugfixing php termination in python server