arguments.callee web design & development blog  


Wampserver 2 and AMFPHP Service Browser

I installed Wampserver 2 and AMFPHP on a computer at work to run some tests, and instead ran into an error when trying to use the Service Browser.

Error retrieving service info: Function eregi_replace() is deprecated C:\wamp\www\amfphp\core\shared\util\MethodTable.php on line 506 Error retrieving service info:

Function eregi_replace() is deprecated
C:\wamp\www\amfphp\core\shared\util\MethodTable.php on line 506

Fortunately, it's easy to fix this problem. Open /amfphp/core/shared/util/MethodTable.php and find the following lines:

        $comment = eregi_replace("\n[ \t]+", "\n", trim($comment));
        $comment = str_replace("\n", "\\n", trim($comment));
        $comment = eregi_replace("[\t ]+", " ", trim($comment));

Modify those lines as follows (feel free to store a backup copy of MethodTable.php first):

        $comment = preg_replace("#\n[ \t]+#U", "\n", trim($comment));
        $comment = str_replace("\n", "\\n", trim($comment));
        $comment = preg_replace("#[\t ]+#U", " ", trim($comment));

That's it! The AMFPHP Service Browser can now interact with your AMFPHP services.

Tags




blog comments powered by Disqus
search blog
  • Pro-HTML5-Programming-Application-Development
  • Pro-CSS-HTML-Design-Patterns
categories & tags
random posts
about hb stone

I'm a Front-End Engineer at Yahoo! working on the Mail and Messenger teams. I blog about web design and development topics including accessibility, usability, performance, and developing HTML / CSS / JavaScript applications on Appcelerator Titanium and Adobe AIR.

If you're a web developer, you might enjoy Jelo, my JavaScript library.

  • JavaScript-Cookbook
  • First-Design-Patterns-Elisabeth-Freeman
copyright

All original work on this site is covered by a Creative Commons Attribution 3.0 license unless otherwise specified.

You may share or use any code or images from this site in any manner, for free, so long as reasonable effort has been made to give credit where due.

The views expressed in the posts and comments on this blog do not necessarily reflect the views of Yahoo!