Section 33. All necessary expenses attending the apprehension, examination, hearing, commitment or delivery of a mentally ill person, or an alleged alcoholic shall be allowed and certified by the judge if said person is committed pursuant to this chapter, and presented as often as once a year to the comptroller, who shall examine and audit the same. Necessary expenses attending the apprehension, examination or hearing of any person sought to be committed pursuant to this chapter but not so committed shall be so presented, examined and audited if they have been allowed in the discretion of the judge and certified by him. All expenses certified, examined and audited as provided in this section shall be paid by the commonwealth. If application is made for the commitment of a person whose expenses and support are not to be paid by the commonwealth, said expenses shall be paid by the applicant or by a person in his behalf. The compensation of the physicians and officers taking part in the commitment or admission of persons to facilities in accordance with this chapter shall be as follows: The fee for each physician making an authorized mental examination and for making a written report thereon to the court, or for making a medical certificate, shall be twenty-five dollars, and twenty cents for each mile traveled one way or such other rates as may be set by the executive office of health and human services or a governmental unit designated by the executive office. Any physician required to appear before a judge or justice in any commitment proceedings, in which such physician has made an examination, shall receive a fee of twenty-five dollars, and twenty cents for each mile traveled one way for such appearance before the court, or such other rate as may be set by the executive office of health and human services or a governmental unit designated by the executive office. The fees for officers servicing process shall be the same as are allowed by law in like cases.