fixed PHP_SAPI bug.