AMFPHP 1.0 milestone 2 alpha

Today Patrick released a new milestone of amfphp: Chnages in this alpha release:

  • Added new methodTable option (per method) “fastArray” => true|false for fast array serializing on return (will only make a difference for large multidimensional nested voodoo arrays)
  • Added new method Headers::getHeader($key) available from all services, also HeadersFilter.php added
  • Added FrontBase support
  • Added Pear::db support
  • Added CSV-based recordsets support
  • Renamed sql folder to adapters to fit with the CSV recordsets
  • Various bugfixes for PHP4 MethodTable class
  • Major overhaul of service browser, should work much better now
  • New actionscript template system for service browser, see browser/templates/ for examples
  • Added new return type binary that will write the value as a string but without charsetHandling
  • Added new return type raw that will write to the output stream directly (careful)
  • SSL with ie hopefully works now

Some new methods included recently, which you can use in the gateway.php file (for production env): – disableStandalonePlayer() Disables the standalone player by filtering out its User-Agent string – disableServiceDescription() Disable service description from Macromedia’s service browser – disableTrace() Disables remote tracing – disableDebug() Stops debug info from being sent (independant of remote trace setting)

amfphp project page

Charset handling proposal in AMFPHP

Patrick Mineault makes a proposal for the charset handling in AMFPHP

[..] that should put an end to problems with Unicode and native character set handling between PHP and Flash, a problem that has palgued AMFPHP for a long time

To use charset handling in the new CVS version, you will need to call the setCharsetHandler function from your gateway.php file, like this:

$gateway->setCharsetHandler("iconv", "latin1", "latin1");

Detail for setCharsetHandler method: setCharsetHandler(string mode, string phpCharset, string sqlCharset) The mode can be: 1. none (don’t do anything) 2. iconv (uses the iconv libray for reencoding) 3. mbstring (uses the mbstring library for reencoding) 4. recode (uses the recode library for reencoding) 5. utf8_decode (uses the XML function utf8_decode and encode for reencoding – ISO-8859-1 only) I haven’t tested it already, but I’m sure this is a great step toward a solution of the charset problem!

http://www.amfphp.org/wiki/doku.php?id=charset_issue