Issues with Zend AMF? Let’s get them resolved before ZF 1.8
February 10th, 2009
The the 1.8 release of Zend Framework right around the corner I am trying hard to get any blocking issues resolved. If you are having any issues with Zend Amf please open up a bug or vote on any existing issues that are keeping you from adopting the framework. Also pull the latest version from SVN if you can to insure it has not been resolved in the last two weeks.
Thanks!


ZendAMF is dependent on a PHP5 installation, right? Unfortunately I cannot take advantage of PHP5, as the majority of web-hosts I deploy on, only support PHP4.
@lee PHP4 is end of life. It’s over, gone, finale. Your hosting companies suck if they are even allowing PHP4 on their servers and need to upgrade as there will never be any other security releases.
@lee GOOD web-hosts support PHP 5, even when PHP 4 was still “alive”, you could activate PHP 5 with a simple htaccess…
hi Wade,
maybe it’s not an issue, but is there a service browser, as amfphp have?
Can you guys refer “enterprise-level” hosts that offer dedicated servers, which you’ve had good experiences with?
Hi Wade,
More example with the Zend Framework (MVC) would be cool,
That’s the only issue I’ve had so far,
I am stuck with Call.BadVersion codes
Good stuff
Wade, not sure if this a bug or just the way I’m implementing it.
Basically I have in the bootstrap
Zend_Session::start();
$server->setSession();
php log file records -
PHP Notice: Undefined index: PHPSESSID in /Applications/MAMP/frameworks/Zend/Amf/Server.php on line 378
What happens is the rest of the script is halted until executed a second time within the same session.
hi wade!
maybe this isn’t the right topic to post this question but i’m really desperate.
how can i use the php class functions after i have received the object in flex? i get access to a php-class and its variables but i want to execute the functions of the returned object. in all the examples i’ve seen there are only variables declared in the vo.
do i have to declare functions in the vo or are the tags in the remote object definition enough to access php functions of a returned object?. please help me out!
@mo AMF is just a transport layer. It can only send parameters and return results. It does not actually return executable code.
@Keith Craigo So the only way that can happen is if Flex is sending a session and the value is null. Can you use a proxy and see if you are getting anything back in the AMF Headers for appendToGateway and then that session should be set as a cookie in the next call.
@wadearnold
Wade,
Sorry for the late response, but the bootstrap file returns
PHP Notice: Undefined index: PHPSESSID in /Applications/MAMP/frameworks/Zend/Amf/Server.php on line 378
AppendToGatewayUrl�ÿÿÿÿ�+?PHPSESSID=584ee70577fa0424967c6957d3198708��
It looks like session support is not being recognized first time through on my server, solved it by using
if($server->isSession()) {$server->setSession();}
in the bootstrap then in my login script
return session_id();
this returns the sessionid on the first pass now, and no more log file errors.
Keith
Hi Wade,
great job on the Zend AMF Server.
However, I still did not manage to get the Value Object classes mapped to PHP classes only with $_explicitType defined in the PHP class. I have to use the $server->setClassMap for every correlation, otherwise the TypeLoader.php of Zend AMF throws an Exception that the VO/PHP class is undefined. (using ZF 1.7.5)
Thanks!
philou
Hi Wade, I’m still stuck on what may just be user error, but I can’t tell. I cannot for the life of me get two untyped Objects to be passed as parameters. It always returns Bad Version. None of the parameters are null. Passing multiple String objects to the PHP code does work, but two Object objects don’t. Is this a bug?
Nevermind, sorry. I got latest from the repository and you’ve already fixed this issue for the next version, apparently. Thanks!
Hi Wade,
I could not integrate Flex within my Zend Framework website, build using Zend_Server thus uses port forwarding.
I tried all approaches…. Made the gateway file as Index controller/Made Gateway file available in the Public directory of the Zf website.
Nothing works for me.
Sincerely request you to guide me, if its not an issue.
regards,
Current Undone
I’ve had a problem with Zend AMF for a while now. (great work on the ZMF plugin, Wade) Some of my service classes always return ‘text/html’ as instead of ‘application/x-amf’. These classes are almost exactly the same only for a few extra functions here and there.
I call two methods from two different service classes. I changed both these methods so that they return strings.
My best bet is that somewhere PHP sends unknown characters with the response and results in it being interpreted as text. But I can not find these characters anywhere!
I guess I should be crying to PHP and not Zend ZMF or even the Zend MVC…
What about returning mysql_result resultset as amfphp do?
Ok, I just figured it out. I use FlashDevelop on WinXP – sometimes I use Scintilla to edit PHP pages. When I created the service class (that is giving me the problems) whichever editor I was using caused extra characters to creep in with the output.
When I concluded this was the problem I created a new service class (copy of the working one) and this solved the problem.
Hi Wade, we ran into a bug yesterday. Using all generic objects and arrays, we had an object nested a couple levels deep that had an array of objects as one of its members. Only the first element of the array had the correct contents; the rest were gibberish.
We worked around this by switching from AMF3 to AMF0, where the problem no longer occurred.
(That was with the 1.7.8 release.)
Thank you for all your work, of course!
I’m not sure where else to post this (is there a Zendamf forum?), so:
There seems to be an issue passing special character values via Zendamf. I’ve written an application that deals with multiple languages. While querying a database that returns data including French-text characters (ie: Québec), the result returned from Zendamf is not handling the special characters (ie: instead of Québec, we receive Qu�c).
I’ve checked the output of the data via Php: the issue is not with the database result – the characters are returned correctly from the database to the Php result-set – I am able to print these characters correctly before they are sent through Zendamf, either by rendering them in HTML or by writing them to a log file.
However, once I plug the SQL result into an object and pass it to Zendamf, the special characters get mangled. Using Charles Web Debugging Proxy, I can see that the result values are mangled before they are passed back to my AS3 application.
Any ideas here? Thanks so much!
@ my comment above:
This is not an issue with Zendamf, but rather Zend_Db, and to resolve the issue I enforced the character set of the persistent db connection to UTF-8 by using the following statement in the Zend_Db::factory parameters:
‘driver_options’ => array(PDO::MYSQL_ATTR_INIT_COMMAND => ‘SET NAMES utf8′)