Fixed php server termination on semaphore