small PHP check before upload or test