Cocaine for children?
Cocaine was legal, even as late as this ad (1885), and was not considered harmful in moderate doses. Many other drugs, now restricted by law, were also legal then, including opium, which was sold under city permit on the streets of Victoria.
In the nineteenth century many substances were used as medicines, some of which are now known to be harmful over the long term, such as mercury and lead. "Patent medicines", like these Cocaine Toothache Drops, were very popular and required no prescription; they were indeed "For sale by all druggists."
By the 1860s, the practice of medicine was going through many changes. The germ theory of disease was a controversial idea and not yet widely accepted. The first of the general anesthetics , chloroform and ether, had recently become available, making surgery potentially life saving rather than life threatening, though the routine use of antiseptics was still some years in the future.
Many medical practitioners still subscribed (at least in some form) to the ancient theory of the "four humors" developed by the Roman physician Galen (131-199 AD). According to this theory, the body is made up of four humors - blood, phlegm, black bile, and yellow bile. The relative amounts of each humor in the body determined state of health and temperament (a person with more blood was "sanguine"; with more phlegm "phlegmatic"; with black bile "melancholic"; and if yellow bile predominated, "choleric" or "bilious"). Too much or too little of any humor was said to cause illness, which could be cured by restoring the balance. Many nineteenth century medicines and practices were intended to do this.