qualche print_r() qua e là talvolta aiuta
http://it.php.net/print_r

buon debug