update socket and phpsocket