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
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.







3 Comments
It was very helpful