PDA

View Full Version : I love Zend Framework (in the dirty way)



letter
May 4th, 2009, 10:19 AM
I've been using this whole ZendFramworkAMF/AS3/PHP/MySQL stuff for a little while now and I love it.

But I am having some frustration in debugging maybe someone has some advice for me.

When I do something like this:

nc.call("PHPClass.PhpMethod",res, dataArray);

if my PHP has something wrong with it (like syntax error or white space or Anything) the only error I get from Flash is:

Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion

Does anyone know how I could get more specific errors when something breaks?

Thanks in advance for the input, these forums are great.

cshaheen
May 4th, 2009, 10:55 AM
You need to go check the apache (or whatever server you are runnings) error logs. When the php call fails, it sends back either the error in plaintext, or nothing at all, and silently logs the error. Both of which will produce an error in flash. Theres no way flash can know exactly what kind of PHP error you've encountered, as it is naive to all the goings-on of the server-side scripts.

unhitched
May 5th, 2009, 08:20 AM
check out MacGDBp.

It was a little too hit & miss for me - sometimes breakpoints would work, other times they wouldn't.

If you were using Flex/Eclipse I'd suggest setting up PDTv2 & XDebug - it's indescribable how great it is to be able to step through server-side PHP code.