free z_path
use php_error instead of zend_error