And Joseph said to the one of the two prisoners who he knew would be set free : " Mention me in your lord 's presence . " But Satan caused him to forget mentioning this to his lord ( the ruler of Egypt ) and so Joseph languished in prison for several years .