In trying to get PHP, AMFPHP and Flash to cooperate together with ByteArray information, Alessandro Crugnola came across some issues:
Recently I made some test in AMFPHP sending an retrieving ByteArray to be stored in a mysql blob field. But suddenly I encounter a problem when I was trying to return an array of ByteArrays and I could not find out the reason flash continued to show me [an] error.
He includes the offending code on both the PHP and ActionScript side and his ultimate solution - a problem with AMFPHP's serializer. He's even made a patch file if you're seeing the same issue and want to bring your install up to date.