How can i solve this problem? The error is: Fatal error: Using $this when not in object context in /.../amfphp/core/amf/app/Gateway.php on line 134
public static function service() {
//Set the parameters for the charset handler
CharsetHandler::setMethod($this->_charsetMethod); // the problem points here
CharsetHandler::setPhpCharset($this->_charsetPhp);
CharsetHandler::setSqlCharset($this->_charsetSql);
//Attempt to call charset handler to catch any uninstalled extensions
$ch = new CharsetHandler('flashtophp');
$ch->transliterate('?');
$ch2 = new CharsetHandler('sqltophp');
$ch2->transliterate('?');
$GLOBALS['amfphp']['actions'] = $this->actions;
You can't use
$thisvariable insidestaticmethods, cause class instance does not exist. Static methods know nothing about instance of the class, you can treat these methods asclass methods, notinstance methods. Looks like you need to removestaticmodifier of this function. Check the docs for further explanation.