The person at whose instance such testimony is taken shall pay to such clerk for his services in such behalf the same fees as are allowed to commissioners in chancery, and to witnesses the same compensation as is allowed to witnesses in other cases. All such fees due the clerk shall be collected by him and paid into the county treasury, and may be collected in the same manner and by the same remedies as costs in a common-law action.