Another good reason not to use temp tables :-)
Temp tables are created 'pre connection' and are only removed when the connection is closed.
When you use pconnect, the connections are not closed.
What's worse, the connections are shared for your scripts, so if one script makes a temp table, the next script can read it (even if it did not create it).
The easiest solution would be to give your temp tables unique names, like a sessionid.
And you'll have to destroy the temp tables manually.