MediaWiki suddenly came with 500 internal error
Fatal error: Uncaught Error: Call to a member function getCode() on
null in /var/www/wiki/includes/user/User.php:1578 Stack trace: #0
/var/www/wiki/includes/user/User.php(5243): User::getDefaultOptions()
#1 /var/www/wiki/includes/user/User.php(2859): User->loadOptions() #2 /var/www/wiki/includes/context/RequestContext.php(364):
User->getOption('language') #3
/var/www/wiki/includes/Message.php(380): RequestContext->getLanguage()
#4 /var/www/wiki/includes/Message.php(1257): Message->getLanguage() #5 /var/www/wiki/includes/Message.php(842): Message->fetchMessage() #6
/var/www/wiki/includes/Message.php(934): Message->toString('text') #7
/var/www/wiki/includes/exception/MWExceptionRenderer.php(254):
Message->text() #8
/var/www/wiki/includes/exception/MWExceptionRenderer.php(358):
MWExceptionRenderer::msg('dberr-again', 'Try waiting a f...') #9
/var/www/wiki/includes/exception/MWExceptionRenderer.php(52):
MWExceptionRenderer::reportOutageHTML(Object(Wikimedia\Rdbms\DBConnectionError))
#10 /var/www/wiki/includes/exception/MWExce in /var/www/wiki/includes/user/User.php on line 1578
I assume this is a bug that might happen if you have multiple install attempts and the mysql.user is still there. I had the same problem today.
I have filed the bug as:
https://phabricator.wikimedia.org/T177768
the Problem went away after reinstalling with the following steps:
dropping database
removing user from mysql.users
strangely the "user exists" error still appeared on installation
granting access rights was therefore necessary on the mysql database.
Related
I'm just trying to install Perch CMS into my site locally. At setup, I put in my XAMPP database server host name, username and I leave the password blank because that is how it is meant to be. But it shows me this error code when I try to move forward:
Fatal error: Uncaught Error: Undefined constant "PERCH_DB_PASSWORD" in C:\xampp\htdocs\dschc\cms\core\lib\PerchDB_MySQL.class.php:46 Stack trace: #0 C:\xampp\htdocs\dschc\cms\core\lib\PerchDB_MySQL.class.php(46): constant('PERCH_DB_PASSWO...') #1 C:\xampp\htdocs\dschc\cms\core\lib\PerchDB_MySQL.class.php(75): PerchDB_MySQL->config('PERCH_DB_PASSWO...') #2 C:\xampp\htdocs\dschc\cms\core\lib\PerchDB_MySQL.class.php(117): PerchDB_MySQL->open_link() #3 C:\xampp\htdocs\dschc\cms\core\lib\PerchDB_MySQL.class.php(460): PerchDB_MySQL->get_link() #4 C:\xampp\htdocs\dschc\cms\setup\PerchSetup_Installation.class.php(13): PerchDB_MySQL->test_connection() #5 C:\xampp\htdocs\dschc\cms\setup\database\index.php(50): PerchSetup_Installation->test_db(Array) #6 {main} thrown in C:\xampp\htdocs\dschc\cms\core\lib\PerchDB_MySQL.class.php on line 46
P.S I have never changed my database connection credentials since I installed XAMPP
I have a dockerized TYPO3 instance on a server and try to flush the typo3 cache manually.
So, I use the following command to do that, inside my docker container:
vendor/.bin/typo3cms cache:flush
However, it fails and returns this error:
[ TYPO3\CMS\Core\Error\Exception ]
Warning: rename(): The first argument to copy() function cannot be a directory in /home/app/vendor/typo3/cms/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 2432
How I can debug this and find out what the problem is?
Full stack trace with -vvv
[ TYPO3\CMS\Core\Error\Exception ]
Warning: rename(): The first argument to copy() function cannot be a directory in /home/app/vendor/typo3/cms/typo3/sysext/core/Classes/Utili
ty/GeneralUtility.php line 2432
Exception code: 1
Exception trace:
#0 ()
vendor/helhum/typo3-console/Classes/Console/Error/ErrorHandler.php:86
#1 Helhum\Typo3Console\Error\ErrorHandler->handleError()
#2 rename()
typo3/sysext/core/Classes/Utility/GeneralUtility.php:2432
#3 TYPO3\CMS\Core\Utility\GeneralUtility::flushDirectory()
vendor/helhum/typo3-console/Classes/Compatibility/TYPO3v87/Service/CacheLowLevelCleaner.php:31
#4 Helhum\Typo3Console\TYPO3v87\Service\CacheLowLevelCleaner->forceFlushCachesFiles()
vendor/helhum/typo3-console/Classes/Console/Command/Cache/CacheFlushCommand.php:69
#5 Helhum\Typo3Console\Command\Cache\CacheFlushCommand->execute()
vendor/symfony/console/Command/Command.php:255
#6 Symfony\Component\Console\Command\Command->run()
vendor/symfony/console/Application.php:1000
#7 Symfony\Component\Console\Application->doRunCommand()
vendor/helhum/typo3-console/Classes/Console/Mvc/Cli/Symfony/Application.php:169
#8 Helhum\Typo3Console\Mvc\Cli\Symfony\Application->doRunCommand()
vendor/symfony/console/Application.php:271
#9 Symfony\Component\Console\Application->doRun()
vendor/symfony/console/Application.php:147
#10 Symfony\Component\Console\Application->run()
vendor/helhum/typo3-console/Classes/Console/Core/Kernel.php:148
#11 Helhum\Typo3Console\Core\Kernel->handle()
vendor/helhum/typo3-console/Scripts/typo3-console.php:30
#12 {closure}()
vendor/helhum/typo3-console/Scripts/typo3-console.php:32
#13 require()
vendor/helhum/typo3-console/typo3cms:3
cache:flush [--files-only]
This was a known issue and fixed with version 5.8.6 of the TYPO3 Console.
Well, the question was: How to debug this. Even if the problem is now solved, this may help:
You got the exception trace. You set a breakpoint in GeneralUtility.php line 2432.
If you already have xdebug set up, you only need to start the command line command with appropriate options, e.g with -e for generating debug information.
You can also look at DDEV. The last time I tried it, it worked pretty nicely to get the debugger to run, see https://ddev.readthedocs.io/en/stable/users/step-debugging/
I usually use xdebug in combination with PhpStorm.
I am getting the following error when exporting a MySQL table to open document spreadsheet. My OS is linux Suse. phpMyAdmin version is 4.8.4. Kindly help.
Fatal error: Uncaught Error: Call to undefined function PhpMyAdmin\gzcompress() in /srv/www/htdocs/pma/libraries/classes/ZipExtension.php:224
Stack trace:
#0 /srv/www/htdocs/pma/libraries/classes/OpenDocument.php(175): PhpMyAdmin\ZipExtension-createFile(Array, Array)
#1 /srv/www/htdocs/pma/libraries/classes/Plugins/Export/ExportOds.php(155): PhpMyAdmin\OpenDocument::create('application/vnd...', Array)
#2 /srv/www/htdocs/pma/export.php(504): PhpMyAdmin\Plugins\Export\ExportOds->exportFooter()
#3 {main} thrown in /srv/www/htdocs/pma/libraries/classes/ZipExtension.php on line 224
I want to download and use thyseus/yii2-message. followed steps on github.
for installation
1) $ composer require thyseus/yii2-message
2) $ php yii migrate/up --migrationPath=#vendor/thyseus/yii2-message/migrations
warning
PHP Warning: Module 'openssl' already loaded in Unknown on line 0
Warning: Module 'openssl' already loaded in Unknown on line 0
Exception 'yii\base\InvalidConfigException' with message 'The configuration for
the "user" component must contain a "class" element.'
in C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\di\ServiceLocator.php:204
Stack trace:
#0 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\di\ServiceLocator.php(260):
yii\di\ServiceLocator->set('user', Array)
#1 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\base\Component.php(172): yii
\di\ServiceLocator->setComponents(Array)
#2 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\BaseYii.php(529): yii\base\C
omponent->__set('components', Array)
#3 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\base\Object.php(105): yii\Ba
seYii::configure(Object(yii\console\Application), Array)
#4 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\base\Application.php(205): y
ii\base\Object->__construct(Array)
#5 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\console\Application.php(89):
yii\base\Application->__construct(Array)
#6 C:\xampp\htdocs\yii2-my-app2\yii(26): yii\console\Application->__construct(Ar
ray)
#7 {main}
PHP Core Warning 'yii\base\ErrorException' with message 'Module 'openssl' alread
y loaded'
in .\Unknown:0
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}
1st command runs successfully but second command gives some warning I didnt get it? can anyone fix it? and I also want to know what does this migration command exactly do
For the warning, check answers to this question.
For the error: Yii2-user or another user extension has to be installed first and working.
I have an error with the user login
Error: The supplied parameters to Zend_Auth_Adapter_DbTable failed to produce a valid sql statement, please check table and column names for validity.
#0 /home/cari/library/Zend/Auth/Adapter/DbTable.php(369): Zend_Auth_Adapter_DbTable->_authenticateQuerySelect(Object(Zend_Db_Select))
#1 /home/cari/library/Zend/Auth.php(117): Zend_Auth_Adapter_DbTable->authenticate()
#2 /home/cari/application/controllers/AuthController.php(49): Zend_Auth->authenticate(Object(Cari_Auth_Adapter_Local))
#3 /home/cari/library/Zend/Controller/Action.php(513): AuthController->identifyAction()
#4 /home/cari/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('identifyAction')
#5 /home/cari/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 /home/cari/application/bootstrap.php(113): Zend_Controller_Front->dispatch()
#7 /home/cari/webroot/index.php(6): Bootstrap->runApp()
#8 {main}
ZF version is 1.11.6, MySQL server version is 5.5.37, running on ubuntu 12.04 with php 5.3.10.
It's a legacy application, so that's the reason of having a so old version of Zend Framework.
Any help on that?
Thanks