To follow the bread crumbs back, here's one place to start.
We do not know for sure whether Paul wrote Galatians or Philippians from Ephesus. But we can feel confident that he wrote at least three letters to Corinth while he was there (he also made a visit to the city that Acts does not record, cf. 2 Cor. 2:1; 13:1). Perhaps surprisingly, we only have one of these three letters for certain, 1 Corinthians. Paul's first letter to Corinth urged the Corinthians to stay away from sexually immoral influences (1 Cor. 5:9), but this letter has not survived.  Paul's second letter is thus the one we now call "First" Corinthians.
Interestingly, the third letter Paul sent to Corinth was not 2 Corinthians.  It was a harsh letter--one Paul in hindsight was not so sure he should have sent (2 Cor. 7:8). Perhaps that is why it was not preserved. The story goes something like the following. We know from 1 Corinthians that there were some in the Corinthian church who questioned Paul's authority. Apparently, the conflict between Paul and these individuals led him to send an ultimatum, which he apparently sent in the hands of Titus (2 Cor. 2:9; 7:13).
Whether Paul wrote this letter before the imprisonment we are suggesting at Ephesus or while he was imprisoned, we cannot say. The stark attitude of Galatians fits the apparent tone of the harsh letter to Corinth more than the mellow attitude of his imprisonment in Philippians. 2 Corinthians 1-9 itself fits more with the tone of Philippians as well. Our hunch is thus that Paul wrote Galatians, then at some point thereafter this harsh letter to Corinth, sending it off with Titus.
Then there was the crisis with Demetrius the silversmith, who brought Paul up on charges. Paul was imprisoned. When news reached the Philippians, they sent one of their overseers, Epaphroditus, with material support. Paul wrote Philippians, giving his intention to come visit them. We wonder if Paul's punishment was to be banished from the city and if such a verdict might have played into the reason he does not return back through Ephesus his next time through the area (cf. Acts 20:16-17). 
Paul had perhaps earlier intended to go directly from Ephesus to Corinth (2 Cor. 1:16). He decides instead to go to Macedonia first, which some at Corinth apparently made an issue of, claiming that Paul was not a man of his word (2 Cor. 1:18-19). His desire to see the Philippians, especially after their support of him in prison, might also have played into his change of plans (Phil. 2:24).
The individual at Corinth apparently submitted, as did the entire community--at least on the surface (2 Cor. 2:5-11). The community disciplined the person in question, so much so that Paul even tells them to let up (2 Cor. 2:6-8). Some have suggested it might have been the man who was sleeping with his step-mother in 1 Corinthians 5. There Paul had told them to hand this person over to Satan (1 Cor. 5:5) and not to eat with him (5:11).
We cannot know for certain that this was the man in question, but he apparently submitted to the community, and the community to Paul. From this incident comes one of the most memorable verses on repentance in the Bible: "Godly grief produces a repentance that leads to salvation and brings no regret" (2 Cor. 7:10). So while Paul was not certain he had done the right thing at first, giving the church an ultimatum in relationship to his authority, his letter at least seems to work and, for the moment, he is glad he did it (7:8-9). As we will see, however, it is not clear that the community's submission was as solid as Paul thought.
 Unless, of course, 2 Corinthians 6:14-7:1 is a displaced fragment from this letter, has some have suggested.
 Although, again, some have suggested that 2 Corinthians 10-13 might be an excerpt from Paul's third, but now lost letter.
 1 Clement mentions that Paul was once banished (5.6). It would also contribute to the reason there was no more room for Paul to minister in the east (Rom. 15:23).