GFX Complex

Amfphp is dead.

I don’t care what Wade Arnold says, amfphp is dead…..

Today I had a project that required some backend db work with flash. I thought to use amfphp which I have not used in over a year. After going to http://amfphp.org just to see what I seen this time last year (“nothing”), I thought “no biggie” amfphp worked great the last time I used it. Well I was wrong, as of php5.3 there are problems now with Amfphp, and since Wade Arnold has done just about nothing with the framework in over 2 year (“since he took over amfphp”) I gonna just say that framework is “dead”.

Well after that naturally I thought maybe it’s time to use Zend amf seeing that it is whats been pushed and worked on for the last year. But go figure, Zend AMF 1.9.5 does not work out of the box if you get it from http://framework.zend.com/download/amf, apparently you will be missing some needed files if you down load it from there. Well after a few hours I found that if you just download the Zend framework from the main page it will have all the needed files. I’m very worried since my experience with Zend Amf has not been intuitive for some one who does not use the zend frame work. The framework in generally  feels like it being made with for the flex framework and not flash from pure as3, I only say that because there are just about no updated examples for flash but many for flex. I’m afraid that flash IDE users are getting the shit end of the stick  when it comes to amf and php.  Now I did get the project working with Zend amf, but now I have a crap load of files on my server that are related to Zend that will only take up space. I know for a fact that people who may have used amfphp who are also not very good with php are gonna struggle with Zend amf.

I want to say that I have respect for what Wade Arnold has done seeing that no one should ever complain about things in life that are free, but I will say that I have said it from the beginning and I’m gonna say it again, Amfphp is dead, and I’m ok with that only because I hope that Wade Arnold puts his time in to making Zend Amf as good as it can be, because right now it felt like pulling teeth using it and the flash industry needs a way to get and send data fast to php.

By the way here are some dates to support claims.

History for Amfphp:
============================
10-19-2008: http://amfphp.org crashed but now back and looks like crap <- just about a year ago and no one  even fixed the site
01-27-2008: Wade Arnold creates a blog which is just about never used but for Zend Amf
01-12-2008: First and only update by Wade Arnold – amfphp-1.9.2 beta.
09-24 2007: Wade Arnold takes over amfphp
05-13-2007: amfphp-1.9.1 beta.

History for Zend Amf:
============================
Zend AMF 1.9.4 2009-10-13
Zend AMF 1.9.3 2009-09-22
Zend AMF 1.9.2 2009-08-25
Zend AMF 1.9.1 2009-08-11
Zend AMF 1.9.0 2009-07-31
Zend AMF 1.8.4 2009-06-23
Zend AMF 1.8.3 2009-06-09
Zend AMF 1.8.2 2009-05-27
Zend AMF 1.8.1 2009-05-12
Zend AMF 1.8.0 2009-04-30
Zend AMF 1.7.8 2009-03-30
Zend AMF 1.7.7 2009-03-16
Zend AMF 1.7.6 2009-03-02
Zend AMF 1.7.5 2009-02-16
Zend AMF 1.7.4 2009-02-02
Zend AMF 1.7.3 2009-01-19
Zend AMF 1.7.2 2008-12-23
Zend AMF 1.7.1 2008-12-01
Zend AMF 1.7.0 2008-11-17
thats all in just this last year….

If I’m wrong I think it’s time Wade Arnold proved me wrong. Two years is a long time in the world of php.

Zend Framework 1.7.1 2008-12-01 zip | tar.gz
Minimal: zip | tar.gz
Download
Zend Framework 1.7.0 Preview Release 2008-10-13 zip | tar.gz Download
Zend Framework 1.7.0 2008-11-17 zip | tar.gz
Minimal: zip | tar.gz
Download
Zend Framework 1.6.2 2008-10-13 zip | tar.gz
Minimal: zip | tar.gz
Download
Zend Framework 1.6.1 2008-09-15 zip | tar.gz
Minimal: zip | tar.gz
Download
Zend Framework 1.6.0 2008-09-02 zip | tar.gz
Minimal: zip | tar.gz
Download
Zend Framework 1.6.0 RC 3 2008-08-26 zip | tar.gz Download
Zend Framework 1.6.0 RC 2 2008-08-11 zip | tar.gz Download
Zend Framework 1.6.0 RC 1 2008-07-21 zip | tar.gz Download
Zend Framework 1.5.3 2008-07-28 zip | tar.gz Download
Zend Framework 1.5.2 2008-05-15 zip | tar.gz Download
Zend Framework 1.5.1 2008-03-25 zip | tar.gz Download
Zend Framework 1.5.0 Preview Release 2008-01-28 zip | tar.gz Download
Zend Framework 1.5.0 2008-03-17 zip | tar.gz Download
Zend Framework 1.5.0 RC 3 2008-03-13 zip | tar.gz Download
Zend Framework 1.5.0 RC 2 2008-03-11 zip | tar.gz Download
Zend Framework 1.5.0 RC 1 2008-02-26 zip | tar.gz Download
Zend Framework 1.0.4 2008-02-26 zip | tar.gz Download
Zend Framework 1.0.3 2007-11-30 zip | tar.gz Download
Zend Framework 1.0.2 2007-09-25 zip | tar.gz Download
Zend Framework 1.0.1 2007-07-30 zip | tar.gz Download
Zend Framework 1.0.0 2007-06-30 zip | tar.gz Download
Zend Framework 1.0.0 RC 3 2007-06-23 zip | tar.gz Download
Zend Framework 1.0.0 RC 2 2007-06-07 zip | tar.gz Download
Zend Framework 1.0.0 RC 1 2007-05-28 zip | tar.gz (included in product)
Zend Framework 0.9.3 Beta 2007-05-04 zip | tar.gz (included in product)
Zend Framework 0.9.2 Beta 2007-04-06 zip | tar.gz (included in product)
Zend Framework 0.9.1 Beta 2007-03-23 zip | tar.gz (included in product)
Zend Framework 0.9.0 Beta 2007-03-16 zip | tar.gz (included in product)
Zend Framework 0.8.0 Preview Release 2007-02-21 zip | tar.gz (included in product)
Zend Framework 0.7.0 Preview Release 2007-01-18 zip | tar.gz (included in product)
Zend Framework 0.6.0 Preview Release 2006-12-16 zip | tar.gz (included in product)
Zend Framework 0.2.0 Preview Release 2006-10-29 zip | tar.gz (included in product)
Zend Framework 0.1.5 Preview Release 2006-07-10 zip | tar.gz (included in product)
Zend Framework 0.1.4 Preview Release 2006-06-29 zip | tar.gz (included in product)
Zend Framework 0.1.3 Preview Release 2006-04-18 zip | tar.gz (included in product)

Get Started

A great place to get up to speed quickly is the Zend Framework QuickStart.

Browse the Repository

You may browse the subversion repository online using the Zend Framework code browser. You can also use this tool to search the repository, view changelogs, and create custom snapshots based on specific revisions or branches of the project.

Subversion Access

Complete source code is available from the Zend Framework Subversion repository via anonymous checkout.

Instructions for accessing our repository can be found in our Subversion Standards.

Subversion commit privileges are granted on an as-needed basis. If you feel you need such privileges, please contact us.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati

28 Comments

    I’m not using PHP 5.3, but what is the issue?

    I did a quick search of the amfphp email list and found this about deprecated alert.
    http://old.nabble.com/Tweaked-AMFPHP-for-PHP-5.3-%28eregi_replace-issue%29-td25278864.html#a25278864

    Not my fix, but here is the content of the email:

    Hello All,
    Just wanted to share that I just changed a couple lines in the
    core/shared/util/MethodTable.php

    I was getting a php “Depreciated” alert for the eregi_replace function used
    there. so I modified it.. however I am not entirely sure that what I did is
    correct as I have very little experience with reg expressions.

    I does work for me so that is why I am sharing it here:

    I changed (around lines number 508-510):
    $comment = eregi_replace(“\n[ \t]+”, “\n”, trim($comment));
    To:
    $comment = preg_replace(“\n[ \t]i”, “\n”, trim($comment));

    it seems to work fine.

  • BTW – I agree with you.. I’m a bit disappointed since Patrick left the project, however, AMFPHP still works — minus PHP 5.3 which I’m not running and haven’t tested. I’ll also state that even if AMFPHP never gets another update, Zend AMF is not that much different. If someone wasn’t that good with PHP and figured out AMFPHP, then they should be able to get Zend working with no more or less trouble than they had with AMFPHP.

    The one thing I miss from Zend is the Service browser, but, you get the same functionality in FlashBuilder so I can live with that and in some ways, its better.

    Not sure if you’ve seen it or not, but Lee Brimelow has a ZendAMF/Flash CS4 video tutorial on his website: http://www.gotoandlearn.com/play?id=90

  • Just additional info on AMFPHP fixes for PHP 5.3 from Hasan at AlmerBlank in LA. AB uses AMFPHP extensively, so I would assume these fixes below are all you need to keep get AMFPHP & PHP 5.3 happy again.

    http://www.almerblanklabs.com/2009/10/amfphp-fatal-errors-after-php-5-3-upgrade-part-1/
    http://www.almerblanklabs.com/2009/10/amfphp-fatal-errors-after-php-5-3-upgrade-part-2/

  • You should have a look into the sabreamf project (http://code.google.com/p/sabreamf/), its updated on a regular basis and its small, compare that to lifting in the whole zend framework just to enable the amf server

    History of sabreamf
    —————
    1 October 2009
    24 September 2009
    23 September 2009
    22 September 2009
    10 September 2009
    8 September 2009
    etc..

    / M

  • Use the fix above and you are good to go, using it now and still works like a bomb :)

  • Current versions of ZendAMF not working is a real pain in the ass. It hasn’t worked since around version 1.8.x or so, and no one notices or fixes it?!?!
    And new versions keep being released… Nobody cares to test them? WTF!

  • “…I don’t want amfphp to die, however, and with Wade in command, I am certain this won’t happen. Long live amfphp!”
    Patrick Minault

  • I am running AMFPHP on php 5.3 with no problems. I did run into the error mentioned above, but made the same change, and it works fine.

  • I’m not sure what the problem is still, I have corrected the regular expressions (“by the way there are two out dated methods in that class. not just one”), yet I’m still having problems with my services working even when just doing a simple hello world.

    Even with all that said, has everyone forgot this is still that same “beta” that is over 2 years old? I don’t think we will see that current management make any improvements to it any time soon.

  • fyi the fix for “Function eregi_replace() is deprecated” is

    change line 505:
    from: $comment = eregi_replace(“\n[ \t]+”, “\n”, trim($comment));
    to: $comment = preg_replace(“\n[ \t]i”, “\n”, trim($comment));

    also change on line 507:
    from: $comment = eregi_replace(“[\t ]+”, ” “, trim($comment));
    to: $comment = preg_replace(“[\t ]i”, ” “, trim($comment));

  • This is what I get after I fix the regX problem.
    This with with a media temple gs hosting with php5

    Fatal error: Uncaught exception ‘VerboseException’ with message ‘Cannot modify header information – headers already sent by (output started at /****/***/**/***/****/domains/gfxcomplex.com/html/amfphp/services/HelloWorld.php:1)’ in /****/***/**/***/****/gfxcomplex.com/html/amfphp/core/amf/app/Gateway.php:191
    Stack trace:
    #0 /****/***/**/***/****/gfxcomplex.com/html/amfphp/core/amf/app/Gateway.php(191): amfErrorHandler(2, ‘Cannot modify h…’, ‘ /****/***/**/***/….’, 191, Array)
    #1 /****/***/**/***/****/gfxcomplex.com/html/amfphp/gateway.php(152): Gateway->service(‘Content-type: a…’)
    #2 {main}
    thrown in /****/***/**/***/****/gfxcomplex.com/html/amfphp/core/amf/app/Gateway.php on line 191

  • Ok this is crazy, I’m on windows 7, I think this is due to the way the file is written, I had modified the DiscoveryService.php and it works just fine, but if I even copy/paste the file it stops working

  • FYI – I asked Wade via twitter if we could move AMFPHP to either Google Code or GitHub. Hopefully if it gets moved, others can get involved and keep it updated.

  • As a follow-up, I did check the SVN repo on AMFPHP at http://sourceforge.net/projects/amfphp/ and it has seen some updates, including an update for the deprecated eregi_replace. While that doesn’t help people who download via the “normal” download link, the fixes are there.

    SVN link: https://amfphp.svn.sourceforge.net/svnroot/amfphp

  • As a follow-up, I downloaded the latest AMFPHP from the SVN, run it under XAMPP which uses PHP5.3 and everything seemed to work just fine. I didn’t do any extensive tests, but ran through my test classes in the AMFPHP browser and no errors.

  • Feel like I’m here on the hour… :)

    Another AMF solution for PHP is Midnight Coders WebOrb for PHP
    http://www.themidnightcoders.com/products/weborb-for-php/overview.html

    The PHP version is free, has a nice browser like AMFPHP does, lots of built-in examples, and can also stub out code for you too. and much more. I have to be honest, i’ve used AMFPHP because I’m used to it, but really should look at WebOrb more because it does so much more.

  • found my problem. Flash develop was to blame. Every time I used it to make a php file amfphp would not load that service. if I made it Dreamweaver it would fix the problem.

    Who knew?

  • Hi,
    I drew the same conclusion and decided to do something about it. I have more motivation than most because I am one of the main contributors to silex(http://silex-ria.org) which happens to use AMFPHP, so we have an interest in getting AMFPHP back on its feet. So I dropped Wade a line and I’m now a project admin for AMFPHP on sourceforge. I commited that fix for the MethodTable so that’s why the latest from the trunk is working nicely. If you have some feature requests or just want to show that you still care, it’s still possible to get the project going again. In the meantime I’m working on revamping the browser.
    bye
    Ariel

  • The `AlmerBlank` link hits 500 internal error. Can anyone give me a brief description of that fix. Thanks!

  • @admin:

    Check the way your editor encode your php file.
    AMFPHP doesn’t like FlashDevelop 8bit-encoding; set it to UTF-8 instead.

  • …or the other way around !

    :)

  • “…and please no dirty names for someone that’s just trying to give you some free code. Go get Live Cycle DS dude!”
    Wade Arnold

    Sounds strategy is clear…

  • Great to hear that AMFPHP is seeing some love! I had given up on it, for all the reasons you’ve outlined here.

    To find that Ariel is now committing changes to it, is excellent.

  • I just wish I had time to learn php good enough to support amfphp, because I would.

  • Yeah same, it’s a useful library!

  • In response to the two lines (505 & 507) in the MethodTable.php file. I tried the change listed by admin above:

    admin
    Nov 4, 2009, 6:31

    fyi the fix for “Function eregi_replace() is deprecated” is

    change line 505:
    from: $comment = eregi_replace(“\n[ \t]+”, “\n”, trim($comment));
    to: $comment = preg_replace(“\n[ \t]i”, “\n”, trim($comment));

    also change on line 507:
    from: $comment = eregi_replace(“[\t ]+”, ” “, trim($comment));
    to: $comment = preg_replace(“[\t ]i”, ” “, trim($comment));

    /////////////////

    and it does not work for me. But if I just comment these two line out everything works like a charm.

  • Looks like AMFPHP has come back from the dead. Version 1.9 has come out of beta and is working well with PHP 5.3 here for me. It also includes a re-skinned services browser etc. Seems the project admins are also now working on version 2.

Leave a Reply