I was developing an application at work that used amfphp 1.9. All was working until i decided to bring it home to work over the weekend (thats already a bad thing to do right there), and i started getting errors. At work i use windows 7+xampp (with php 5.3.8), at home i use windows 8+xampp (with php 5.4.7). Identifying the possible culprit was easy enough, but fixing the problem was something else. What i knew was that amfphp version 1.9 had some issues with later versions of PHP.
After using Charles (if you dont know what it is, see -> here) to sniff the amf communication, i saw some errors like this:
‘Fatal error: Uncaught exception ‘VerboseException’ with message ‘Non-static method CharsetHandler::getMethod() should not be called statically’ in…’
Looking at the lines of the files mentioned on the errors and searching in google, i found some possible solutions. The one that worked was to make all the php functions listed as non static (therefore giving the error), static.
The list of the functions that give errors is:
In case you are a newbie in programming, or life itself, the files to edit are inside “core” directory, spread over the folders inside it, and their names are the strings between the “-” and the “::” in the listing above. (i.e. for “-CharsetHandler::getMethod”, the filename is “CharsetHandler.php”)
UPDATED: Added sebpatu’s correction (see comments). Thanks.
Credits go to this forum thread: