Closed songnguxyz closed 5 months ago
Check the debug log (for errors or anything suspicious):
$wgDebugLogGroups['FileOperation'] = '/path/to/some/writable/file.log';
I tries to do it but finds no success, so instead I first inspect PHP log and:
[22-May-2024 15:17:09 UTC] PHP Warning: require_once(/home/songngu-ww2/htdocs/ww2.songngu.xyz/extensions/AWS/s3/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/songngu-ww2/htdocs/ww2.songngu.xyz/extensions/AWS/s3/AmazonS3FileBackend.php on line 25
So I try the dangerous one (ShowExceptionDetails) and I got this:
Original exception: [90345e3dd249047c65443dbd] /index.php?title=%C4%90%E1%BA%B7c_bi%E1%BB%87t:T%E1%BA%A3i_l%C3%AAn Error: Failed opening required '/home/songngu-ww2/htdocs/ww2.songngu.xyz/extensions/AWS/s3/../vendor/autoload.php' (include_path='/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/console_getopt:/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/mail:/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/mail_mime:/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/net_smtp:/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/net_socket:/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/net_url2:/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/pear-core-minimal/src:/home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/pear/pear_exception:.:/usr/share/php')
Backtrace:
from /home/songngu-ww2/htdocs/ww2.songngu.xyz/extensions/AWS/s3/AmazonS3FileBackend.php(25)
#0 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/AutoLoader.php(221): require()
#1 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/filebackend/FileBackendGroup.php(203): AutoLoader::autoload()
#2 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/filerepo/FileRepo.php(189): FileBackendGroup->get()
#3 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/filerepo/LocalRepo.php(84): FileRepo->__construct()
#4 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/filerepo/RepoGroup.php(417): LocalRepo->__construct()
#5 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/filerepo/RepoGroup.php(389): RepoGroup->newRepo()
#6 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/filerepo/RepoGroup.php(311): RepoGroup->initialiseRepos()
#7 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/filerepo/RepoGroup.php(345): RepoGroup->getRepo()
#8 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/specials/SpecialUpload.php(85): RepoGroup->getLocalRepo()
#9 /home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/wikimedia/object-factory/src/ObjectFactory.php(240): MediaWiki\Specials\SpecialUpload->__construct()
#10 /home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/wikimedia/object-factory/src/ObjectFactory.php(149): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec()
#11 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/specialpage/SpecialPageFactory.php(1471): Wikimedia\ObjectFactory\ObjectFactory->createObject()
#12 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/MediaWiki.php(304): MediaWiki\SpecialPage\SpecialPageFactory->getPage()
#13 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/MediaWiki.php(960): MediaWiki->performRequest()
#14 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/MediaWiki.php(613): MediaWiki->main()
#15 /home/songngu-ww2/htdocs/ww2.songngu.xyz/index.php(50): MediaWiki->run()
#16 /home/songngu-ww2/htdocs/ww2.songngu.xyz/index.php(46): wfIndexMain()
#17 {main}
Exception caught inside exception handler: [90345e3dd249047c65443dbd] /index.php?title=%C4%90%E1%BA%B7c_bi%E1%BB%87t:T%E1%BA%A3i_l%C3%AAn TypeError: Cannot assign null to property MediaWiki\Specials\SpecialUpload::$localRepo of type LocalRepo
Backtrace:
from /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/specials/SpecialUpload.php(85)
#0 /home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/wikimedia/object-factory/src/ObjectFactory.php(240): MediaWiki\Specials\SpecialUpload->__construct()
#1 /home/songngu-ww2/htdocs/ww2.songngu.xyz/vendor/wikimedia/object-factory/src/ObjectFactory.php(149): Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec()
#2 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/specialpage/SpecialPageFactory.php(1471): Wikimedia\ObjectFactory\ObjectFactory->createObject()
#3 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/skins/SkinTemplate.php(1408): MediaWiki\SpecialPage\SpecialPageFactory->getPage()
#4 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/skins/SkinTemplate.php(1345): SkinTemplate->getSpecialPageAssociatedNavigationLinks()
#5 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/skins/SkinTemplate.php(604): SkinTemplate->buildContentNavigationUrlsInternal()
#6 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/skins/SkinTemplate.php(181): SkinTemplate->getPortletsTemplateData()
#7 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/skins/SkinMustache.php(125): SkinTemplate->getTemplateData()
#8 /home/songngu-ww2/htdocs/ww2.songngu.xyz/skins/Vector/includes/SkinVectorLegacy.php(161): SkinMustache->getTemplateData()
#9 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/skins/SkinMustache.php(92): MediaWiki\Skins\Vector\SkinVectorLegacy->getTemplateData()
#10 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/skins/SkinTemplate.php(174): SkinMustache->generateHTML()
#11 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/Output/OutputPage.php(2947): SkinTemplate->outputPage()
#12 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/exception/MWExceptionRenderer.php(188): MediaWiki\Output\OutputPage->output()
#13 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/exception/MWExceptionRenderer.php(105): MWExceptionRenderer::reportHTML()
#14 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/exception/MWExceptionHandler.php(134): MWExceptionRenderer::output()
#15 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/exception/MWExceptionHandler.php(251): MWExceptionHandler::report()
#16 /home/songngu-ww2/htdocs/ww2.songngu.xyz/includes/MediaWiki.php(635): MWExceptionHandler::handleException()
#17 /home/songngu-ww2/htdocs/ww2.songngu.xyz/index.php(50): MediaWiki->run()
#18 /home/songngu-ww2/htdocs/ww2.songngu.xyz/index.php(46): wfIndexMain()
#19 {main}
Error: Failed opening required '[...]/extensions/AWS/s3/../vendor/autoload.php'
Please follow the installation instructions in README (you didn't run the Composer).
It turns out that I use CloudPanel to manage my instance and while SSH-ing I don't have enough perms, which causes the composer update
not to work as intended. I logged in as root, navigated myself to the folder, and ran, which worked as expected.
Anyways to create thumbnails from S3 storage?
MediaWiki creates thumbnails the same way with and without this extension.
Cloudflare R2 is believed to have almost the same compatibility, so I can technically use it, but I can't get it working.
So here is what I use to setup with R2: