php4 calls ct_cancel with a NULL connection and a valid cmd structure. Freetds does not validate the connection pointer and segfaults. Simple fix, on first line of ct_cancel add: if (!conn) { conn = cmd->con; } Richard. (Fixes a LOT of problems with php4)