Topic on Extension talk:OATHAuth

PHP Fatal Error Occurred

4
Zorua Fox (talkcontribs)

When I use the latest version of OATHAuth on MediaWiki1.39.4,an error occurred.

2023/07/21 00:34:54 [error] 12943#0: *2494 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Unable to open file /www/wwwroot/wiki.youshouyan.org/extensions/OATHAuth/extension.json: filemtime(): stat failed for /www/wwwroot/wiki.youshouyan.org/extensions/OATHAuth/extension.json in /www/wwwroot/wiki.youshouyan.org/includes/registration/ExtensionRegistry.php:199
Stack trace:


# 0 /www/wwwroot/wiki.youshouyan.org/includes/GlobalFunctions.php(49): ExtensionRegistry->queue()
# 1 /www/wwwroot/wiki.youshouyan.org/LocalSettings.php(218): wfLoadExtension()
# 2 /www/wwwroot/wiki.youshouyan.org/includes/Setup.php(218): require_once('...')
# 3 /www/wwwroot/wiki.youshouyan.org/includes/WebStart.php(86): require_once('...')
# 4 /www/wwwroot/wiki.youshouyan.org/index.php(44): require('...')
# 5 {main}

 thrown in /www/wwwroot/wiki.youshouyan.org/includes/registration/ExtensionRegistry.php on line 199" while reading response header from upstream, client: 103.15.97.139, server: wiki.zorua.top, request: "GET /wiki/有兽档案馆:首页 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-81.sock:"
TheDJ (talkcontribs)
Unable to open file /www/wwwroot/wiki.youshouyan.org/extensions/OATHAuth/extension.json

Make sure your php process is allowed to open this file.

Zorua Fox (talkcontribs)

I've changed the permission code of extension.js from 655 to 755, and PHP stopped throwing the error above. However, when I click the "enable" button on Special:OATHAuth page, the website still returns code 404, without any further explanation in the error log. Actually, this is the original bug that drove me to look into the error log yesterday.

I've performed an investigation into the source code, and I found that 404 is thrown when PHP is executing Line 121 of src/Module/TOTP.php, i.e., creating a TOTPEnableForm object. I hope this information is helpful for debugging, and I'm always glad to provide more information when needed.

This post was hidden by Zorua Fox (history)
Reply to "PHP Fatal Error Occurred"