Before we even get into Pharaoh's dream, I have to make a comment about the first few words of this passage:
We pass over those words without a thought, but for Joseph, they probably seemed like a very long period of time. Can you imagine how he felt, realizing that the baker he had helped had apparently forgotten to keep his promise about speaking to Pharaoh on his behalf? Yet Joseph remained faithful to God in the midst of his imprisonment.
God had not forgotten Joseph. Even at that moment, He was working out the means for Joseph's release. Joseph did not know what God was doing, but God knew what Joseph needed, and would work all things together for His glory and for Joseph's good. Like a master weaver, He was weaving all the necessary elements together so that, at just the right time, Joseph would be released from prison. The baker's forgetfulness, the Pharaoh's troublesome dreams -- all these seemingly unrelated things would come together for a single purpose.
"He fell asleep again and had a second dream: Seven heads of grain, healthy and good, were growing on a single stalk. After them, seven other heads of grain sprouted -- thin and scorched by the east wind. The thin heads of grain swallowed up the seven healthy, full heads. Then Pharaoh woke up; it had been a dream.
In the morning his mind was troubled, so he sent for all the magicians and wise men of Egypt. Pharaoh told them his dreams, but no one could interpret them for him." (Genesis 41:5-8 NIV)
In contrast to God's all-knowing wisdom, the magicians and wise men could not make heads or tails (pun intended) of the dreams. And then, as if cannibalistic cows and corn wasn't enough, we arrive at the crucial part of the story, when the baker realizes he has forgotten all about Joseph for two years.