fix PHP_SELF bugs