Several times in the letter to Philemon, Paul mentions his chains or his imprisonment. In verse 10 he mentions that Onesimus became his son while Paul was in chains. Where was Paul imprisoned when he met Onesimus? From verse 23, it seems like Epaphras was perhaps imprisoned with him. Does this give us a clue about Paul's location?
See W.E. Oesterley's older but helpful discussion in The Expositor's Greek Testament (1897), vol. 4, p. 206, who with the majority of older scholars opted for seeing this imprisonment of Paul belonging to Rome rather than Caesarea.
The more recent view is that the Roman location presents logistical problems, and that an Ephesian imprisonment is the more likely. This is solution followed by Marion Soards in the Eerdmans Bible Dictionary (2000), p. 1046. See also the discussion by Stephen Robert Llewelyn, "Sending Letters in the Ancient World: Paul and the Philippians", Tyndale Bulletin 46 (1995), on pp. 351-352 [whole article available].
There is only the "mere" detail of imprisonment to go on in Philemon. The only option open, then, is to triangulate between its internal evidence and align it with Paul's other letters in the most satsifactory way possible -- but different readers will priortise different pieces of evidence. There is, then, widespread but not unanimous agreement.