I'm not running under mod_perl. This is just a regular CGI scripts. The wierd thing is that this behaveiour only happens when I give my script parameters (/.../addItem.cgi?media_type=1).
I think you had better show us the smallest bit of code that you have that exhibits this behaviour as my test program still prints to the error log when I add parameters.