in reply to ... something in the environment?
Maybe the problem hides in the omitted part of your code. There is no declaration shown for $p1 to $p9 and you don't have a problem when bind_param is called with these variables.
Just a guess...
-jo
In Section
Seekers of Perl Wisdom