Acclaimed director Peter Farrelly is apologizing to Cameron Diaz and others for repeatedly flashing his penis on movie sets back in the day, which he now calls a poor attempt at humor.

Peter's public apology comes after Cameron's interviews from 20 years ago resurfaced. The actress, who starred in his '98 hit, "There's Something About Mary," said Peter flashed his genitals on set and during her audition.

Peter told The Hollywood Reporter it's all true, saying, "I was an idiot. I did this decades ago and I thought I was being funny and the truth is I'm embarrassed and it makes me cringe now. I'm deeply sorry."

Worth noting, when Cameron talked about the 'Mary' audition incident, she said she wasn't appalled. As she put it back then, "When a director shows you his penis the first time you meet him, you've got to recognize the creative genius."