Manual talk:How to debug/Archive 2/Flow export
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Previous discussion was archived at Manual talk:How to debug/Archive 1 on 23 January 2019.
What is this xdebug_on?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
> xdebug_on; php5 /vagrant/mediawiki/tests/phpunit/phpunit.php --wiki=wiki /vagrant/mediawiki/extensions/Extension/tests/phpunit/SomeTest.php; xdebug_off
Yeah, that command doesn't exist. And php5? Really? otheus (talk) 18:44, 16 September 2019 (UTC)
xdebug_onandxdebug_offare shell functions included in MediaWiki-Vagrant. They set and clear the environment variables XDEBUG_CONFIG and PHP_IDE_CONFIG. The docs could make this more clear.- The explicit use of
php5is also a dated reference to MediaWiki-Vagrant configuration. Modern MediaWiki-Vagrant usage should be justphpor possiblyphp7.2. The legacy php5 was once needed to select a Zend-based PHP runtime rather than an HHVM runtime. BDavis (WMF) (talk) 19:46, 16 September 2019 (UTC)
session.save_path?
[edit]I have question regarding the php.ini-conf "session.save_path".
Is this in MediaWiki 1.35 used for anything else than the setup (mw-config)?
At least on windows it writes to the windows-temp folder if this config is not set.
If this is only for setup than I'm fine with it. Since user-login are not stored there since some versions, there is nothing left, right? Berot3 (talk) 13:26, 1 February 2021 (UTC)
Please explain wfDebugLog in more detail
[edit]1. Please explain how wfDebugLog actually works. What happens if no debug-group array is defined? What happens if it is defined but the particular group is not? For instance, if wfDebugLog("test","string") and "test" is not an element in in the groups variable, what happens?
2. How can we overwrite the string-emit function so that the debug lines contain useful information, such as session-id or sever-unique-id or process-id, and date-time stamp?
3. In the "LegacyLogger" factory definition, there is reference to PSR-3 logging, and that wfDebug is considered 'legacy'. Where is this non-legacy logging feature documented? otheus (talk) 23:18, 3 February 2021 (UTC)
- Manual:Structured logging may answer some of your logging related questions. BDavis (WMF) (talk) 03:15, 4 February 2021 (UTC)
wfDebugLog works on web page but not in phpunit
[edit]when i put wfDebugLog in a php file it works when i open a local mediawiki page, but not when i run phpunit test. QDinar (talk) 18:51, 29 June 2021 (UTC)
- it is permission problem. phpunit runs by user, local page runs by www-data. when i tried log file in user home folder, it works. QDinar (talk) 07:05, 30 June 2021 (UTC)
Unknown Internal Error
[edit]Hello. Hope all are well.
My wiki sometimes gets an internal error I am not aware of why or what it is. Can someone please explain to me what this means and why this is happening? The following message comes up:
[YoO_Wl0PMPGEqgm7K-uljwAAABk] 2022-05-17 15:29:30: Fatal exception of type MWException
Any assistance would be greatly appreciated to resolve this issue.
TIA Thepainking (talk) 15:54, 18 May 2022 (UTC)
- You will need to setup logging (or find existing log files from your current configuration) in order to find out more about that error. BDavis (WMF) (talk) 16:04, 18 May 2022 (UTC)
- These are the details i received:
- Parse error: syntax error, unexpected end of file in /nfs/c10/h05/mnt/229444/domains/encyclopediaoftouchbodysenseandpain.com/html/LocalSettings.php on line 196
- initially it said line 206 which was blank so deleted all the blank lines upto 196 and now it says this. Can someone please explain this to me and how i can fix it?
- TIA Thepainking (talk) 15:35, 19 May 2022 (UTC)
- This error message indicates that there is a syntax error in your LocalSettings.php file. Web searches can help you find advice on how to figure out exactly what is wrong with the syntax. An example of this kind of advice that I found by searching for "php syntax error" is https://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them. Most commonly I would start by looking for mismatched quotes, missing quotes, and missing semicolons introduced by various bits of configuration you may have copied into your LocalSettings.php file. BDavis (WMF) (talk) 16:03, 19 May 2022 (UTC)