2017-03-01 112 views
-3

我有一個網站www.dewijsneus.be,其中只有一些圖形設計出現,但沒有內容。該網站正在使用Flash。」不應該靜態調用CharsetHandler :: setMethod()的非靜態方法「

在我的日誌我看到以下內容:

[Wed Mar 01 19:25:42 2017] [warn] [client 81.82.166.122] mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'VerboseException' with message 'Non-static method CharsetHandler::setMethod() should not be called statically, assuming $this from incompatible context' in /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/core/amf/app/Gateway.php:134, referer: (http)://www.dewijsneus.be/deWijsneus.swf/[[DYNAMIC]]/4 [Wed Mar 01 19:25:42 2017] [warn] [client 81.82.166.122] mod_fcgid: stderr: Stack trace:, referer: (http)://www.dewijsneus.be/deWijsneus.swf/[[DYNAMIC]]/4 [Wed Mar 01 19:25:42 2017] [warn] [client 81.82.166.122] mod_fcgid: stderr: #0 /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/core/amf/app/Gateway.php(134): amfErrorHandler(2048, 'Non-static meth...', '/var/www/vhosts...', 134, Array), referer: http://www.dewijsneus.be/deWijsneus.swf/[[DYNAMIC]]/4 [Wed Mar 01 19:25:42 2017] [warn] [client 81.82.166.122] mod_fcgid: stderr: #1 /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/gateway.php(154): Gateway->service(), referer: (http)://www.dewijsneus.be/deWijsneus.swf/[[DYNAMIC]]/4 [Wed Mar 01 19:25:42 2017] [warn] [client 81.82.166.122] mod_fcgid: stderr: #2 {main}, referer: (http)://www.dewijsneus.be/deWijsneus.swf/[[DYNAMIC]]/4 [Wed Mar 01 19:25:42 2017] [warn] [client 81.82.166.122] mod_fcgid: stderr: thrown in /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/core/amf/app/Gateway.php on line 134, referer: (http)://www.dewijsneus.be/deWijsneus.swf/[[DYNAMIC]]/4 [Wed Mar 01 19:29:52 2017] [warn] [client 162.158.234.60] mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'VerboseException' with message 'Non-static method CharsetHandler::setMethod() should not be called statically, assuming $this from incompatible context' in /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/core/amf/app/Gateway.php:134 [Wed Mar 01 19:29:52 2017] [warn] [client 162.158.234.60] mod_fcgid: stderr: Stack trace: [Wed Mar 01 19:29:52 2017] [warn] [client 162.158.234.60] mod_fcgid: stderr: #0 /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/core/amf/app/Gateway.php(134): amfErrorHandler(2048, 'Non-static meth...', '/var/www/vhosts...', 134, Array) [Wed Mar 01 19:29:52 2017] [warn] [client 162.158.234.60] mod_fcgid: stderr: #1 /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/gateway.php(154): Gateway->service() [Wed Mar 01 19:29:52 2017] [warn] [client 162.158.234.60] mod_fcgid: stderr: #2 {main} [Wed Mar 01 19:29:52 2017] [warn] [client 162.158.234.60] mod_fcgid: stderr: thrown in /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/core/amf/app/Gateway.php on line 134 [Wed Mar 01 20:08:27 2017] [error] [client 162.158.234.60] Directory index forbidden by Options directive: /var/www/vhosts/dewijsneus.be/httpdocs/amfphp/

如何調試呢?

+0

是使用$ this在上下文中出現在Gateway.php:134,文件 –

回答

1

方法setMethod裏面的類CharsetHandler不是作爲聲明的靜態方法。您必須在CharsetHandler類的實例上調用它:$instanceOfCharsetHandler->setMethod()。看看/var/www/vhosts/dewijsneus.be/httpdocs/amfphp/core/amf/app/Gateway.php on line 134

+0

感謝您的快速回復。我是PHP的新手。所以我改變了'CharsetHandler :: setMethod($ this - > _ charsetMethod);' '$ instanceOfClientHandler-> setMethod($ this - > _ charsetMethod)'? –

+0

不是。你需要展示如何獲得'CharsetHandler'的實例,或者如果可能的話創建一​​個新的'$ charsetHandler = new CharsetHandler();'並使用它'$ charsetHandler-> setMethod($ this - > _ charsetMethod);' – Kyoya

相關問題