[04:27:12] SO uh [04:27:26] "Your default directory for uploads /foo/ is vulnerable to arbitrary scripts execution." [04:27:34] Then it tells me to set up some htaccess rules [04:27:36] which I do [04:27:40] and it's still giving me the same error. [04:27:42] Can somebody help? [04:28:01] It's telling me to follow https://www.mediawiki.org/wiki/Manual:Security#Upload_security [04:28:08] What else am I missing? [04:33:55] Anyone? [04:52:35] quackgyver: You probably need to adjust directory permissions. [05:51:43] join [05:54:34] join [11:39:22] I am no longer able to access my mediawiki, hosted on my Ubuntu remote server [11:39:29] http://pipad.org/wiki/index.php/Main_Page [11:39:51] Any ideas how I can go about debugging? [11:39:59] I suppose I should try restarting Apache first [11:41:37] `sudo cat /var/log/apache2/error.log` isn't showing anything interesting [11:41:39] Hello everyone. I wish to ask if it is necessary to download the mediawiki software if I want to contribute as a developer only [11:41:43] Restarting didn't work [11:43:43] billm: you'll need to download from git. If you want to fix bugs you'll need to test that it works locally ;) [11:44:16] pi-: I see "Cannot contact the database server". Is mysql running? [11:46:46] @Vulpix: Thanks for your answer [11:47:15] Vulpix: I'm not sure. Is mysql independent of Apache? How to check? [11:50:33] aha sudo apache2ctl restart [11:50:58] no, dur. That is Apache obviously. [11:51:46] This has happened before. I can't remember how I fixed it. [11:52:29] I wonder if updating with apt-get sometimes breaks the configuration [11:56:39] When reading I saw that there was a link to download the software itself and again I saw that there was a link to download the source code [11:57:57] So my question is; if I want to contribute as a developer should I download the software itself and the source code or only the source code [12:03:43] Hello is anyone around?? [12:04:05] aah [12:04:07] pi@PiDroplet:~$ mysqladmin status [12:04:08] mysqladmin: connect to server at 'localhost' failed [12:04:08] error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)' [12:04:09] Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! [12:05:13] billm: I'm not developing mediawiki, but generally the answer would be 'download the source code and compile/etc' [12:05:45] There wouldn't be any sense in downloading the user version [12:07:04] pi: Ok thanks I'm a newbie developer and I wanted to be sure [12:10:42] pi: Thanks a lot for your suggestion [12:12:04] https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki <-- I found some instructions for cranking up MySQL, but this seems to be in the context of installing [12:12:15] And I installed a year ago, all of this was working! [12:13:30] DAYUM rebooting Ubuntu fixed it! [12:13:37] The oldest trick in the book! [12:31:20] heh [12:50:30] hi, is it possible two change the output of numbered lists? (#)
  • changes number into letter so the result is "a.", "b." etc, but howto change the dot into something else, like ")"? [12:50:41] *to change [12:52:06] so the result is a), b) not a., b. etc [12:54:07] auvajs: that's not MediaWiki-related but... see http://www.w3.org/TR/css-lists-3/#marker-pseudo-element [12:55:07] no idea about how current browsers support this [12:56:00] Vulpix: hm but howto use it inside mediawiki? [12:56:28] auvajs: see https://www.mediawiki.org/wiki/Manual:Interface/CSS [12:57:39] Vulpix: I'm not site admin to set up site css [12:57:51] I just want to use it in an article [12:58:28] well, you can't do that, then. At least not with CSS. You'll have to type and format the list letters manually [12:59:19] the css can't be used inside
  • ? [13:00:34] or inside
    ? [13:01:46] you can't style pseudo-elements using style attributes [13:02:10] too bad [13:15:20] I have lots of these warnings in refreshLinks.php: [13:15:23] Warning: failed to mkdir "/var/www/mediawiki/images/thumb/f/fb/Yes_check.svg" mode 0777 [Called from wfMkdirParents in /var/www/mediawiki/includes/GlobalFunctions.php at line 2537] in /var/www/mediawiki/includes/debug/MWDebug.php on line 300
    [13:15:35] is it a problem? [13:15:53] I have also found out that editing the site is extremely slow if the page contains an image [13:16:43] would setting /var/www/mediawiki/images chmod 777 help? [13:17:15] You probably don't want it to be world writeable if owned correctly for your webserver [13:18:16] but could the slowliness be caused by this? [13:18:37] I couldn't say exactly, but it's probably not helping matters [13:18:53] hm it's still extremely slow :( [13:18:59] even after changing it [13:18:59] mmm, you run refreshLinks.php from command line, but with a user that's different than the webserver [13:19:26] Vulpix: I ran it via Maintenance shell extension [13:19:37] that means thumbs created by the script may have wrong owner and the webserver won't have permissions to write on them if the image changes or is deleted, etc [13:23:20] the thing is, I am having several wikis using the same mediawiki install, via shared LocalSettings, when I run shell script they are executed only for the default wiki [13:23:29] how can I run shell scripts for the other wikis? [13:24:56] it depends on how you differentiate wikis in LocalSettings.php, maybe using the --wiki parameter? [13:25:15] switch ( $_SERVER['SERVER_NAME'] ) { [13:25:16] case [13:26:00] auvajs: did you setup these wikis using one of the pre-existing guides? [13:27:22] p858snake|l: I have the version mentioned in https://www.mediawiki.org/wiki/Manual:Wiki_family#Giant_switch_statement [13:28:10] in the first example [13:28:32] !e MaintenanceShell [13:28:32] https://www.mediawiki.org/wiki/Extension:MaintenanceShell [13:29:29] https://www.mediawiki.org/wiki/Manual:Wiki_family#Updating_wikifarm_from_the_commandline [13:30:11] it covers how to do the maintenance from the command line [13:32:37] apparently, MaintenanceShell isn't spawning a php cli, but executing the maintenance script directly on the context of the webserver, so $_SERVER should be correct at this point [13:36:30] hm that guide doesn't work, I set up "SERVER_SITE" variable but I still get PHP Notice: Undefined index: SERVER_NAME in /var/www/mediawiki/LocalSettings.php on line 67 [13:37:33] auvajs: is there any reason you are using MaintenanceShell instead of just using a proper command line interface to do it? [13:39:18] well, $_SERVER is not defiled if the script is run from command line, so the switch needs a fallback for command line [13:40:47] p858snake|l: as I said, I didn't figure out yet how to run script via shell for the other wikis, setting SERVER_SITE variable doesn't work [13:46:27] Katie> quackgyver: You probably need to adjust directory permissions. [13:46:31] I don't know if you're still up but [13:46:40] The security page says nothing about directory permissions [13:46:59] so it's kind of weird that it'd throw out an installation error and not tell me which permission it wants [13:47:18] "Your default directory for uploads /foo/ is vulnerable to arbitrary scripts execution." [13:47:36] Then it links to https://www.mediawiki.org/wiki/Manual:Security#Upload_security [13:47:43] which doesn't mention it :/ [13:48:04] oops, $_SERVER is indeed defined and holds the environment variables when run from the shell [13:53:10] quackgyver: the problem is not permissions, but your upload directory allows php scripts located there to be executed as php scripts [13:54:03] Vulpix: yes, which is why I followed the instructions and uploaded htaccess configs [13:54:04] quackgyver: you need to use php_admin_flag engine off for the upload directory, or map php files to text/plain, whatever [13:54:08] and it's still spitting out the error [13:55:01] quackgyver: are you using the default /images directory? or have you moved it somewhere else? [13:55:14] I think I've found a bug there :P [13:55:32] > $dir = $IP . '/images/'; [13:55:46] so what if the user wants to place uploads in another directory? :S [13:56:26] that hardcoded "/images/"... gaaaaah! [13:57:13] Vulpix: it's the default directory [13:57:19] I'm doing a straight-up vanilla install [14:00:34] quackgyver: installer writes a file to $IP/images/ with php extension, and then makes an internal HTTP request to your server pointing to the images directory and the file it generated. It then checks if the response has a special text that's echoed from PHP... [14:00:45] so basically, your server is executing PHP scripts there [14:02:55] quackgyver: maybe you don't allow .htaccess overrides on that directory, and .htaccess is being ignored there? [14:09:31] Vulpix: I don't know what that means [14:09:35] Can you just tell me what I need to do [14:09:53] These installer instructions are pretty awful and they aren't really specific as to what you're supposed to do where [14:10:10] agreed [14:12:52] Vulpix: I put a .htaccess file in home with the instructions that the guide told me to put there [14:13:04] [14:13:07] and then the rules [14:13:12] Isn't that what I'm supposed to do [14:14:04] this check on the installer is also not very reliable, default installation has an .htaccess that doesn't disable script execution, but when I've installed it didn't warned about that... the check must be failing for me [14:16:57] quackgyver: I think that won't work inside an .htaccess, that should be inside an apache configuration file [14:17:09] .htaccess may have another syntax. Let me see... [14:17:48] I don't really feel like setting up local rules in a global config file that affects everything on my domain though [14:20:49] Wait, apache configs [14:20:59] isn't that when you have to like, set stuff up via CLI and then restart the apache server? [14:21:08] This is just a regulra webhost, so that isn't ideal IMO [14:21:36] I've enabled AllowOverride for my mediawiki directory to test if it works, and accessing the images directory now fails with "/images/.htaccess: RewriteEngine not allowed here" [14:21:38] * Vulpix cries [14:22:46] > .../images/.htaccess: php_admin_flag not allowed here [14:23:17] that's like playin whack-a-mole [14:25:07] php_admin_value can't be set in .htaccess [14:26:04] Ugh [14:26:15] Why is MediaWiki the only system that has complained about this? [14:26:22] I've never had issues setting anything else up on my server [14:28:28] quackgyver: I've never encountered that issue before. There's a bug here, indeed, but actually, that safety check seems to not run for anybody else except you :( [14:28:41] That's pretty bonkers [14:45:20] Vulpix: Are these settings I can fix in the future? [14:46:02] post-install? [14:49:16] I guess the installer aborts before you can install, so I don't think so... [14:51:22] quackgyver: Assuming your server allows you to override thinhs with .htaccess, edit the .htaccess of the images directory to add the lines I've added starting at line 9 http://dpaste.com/3KTA98B#line-9 [14:51:36] Vulpix: I already finished installing :/ [14:52:14] really? so it displayed that as a warning and you could continue installing? [14:56:14] Vulpix: Yes [14:57:29] quackgyver: were you upgrading or installing a new instance? [14:57:36] Fresh install [15:09:40] holy fucking shit [15:09:44] the mediawiki documentation is horrid [15:09:53] you can't even find the answer to the simplest questions [15:10:04] "How to link to a user page" leads to the most convoluted bullcrap imaginable [15:10:05] Jesus. [15:10:11] Why is nobody fixing this [15:10:13] yo [15:11:02] Why do you expect linking to user pages to be different to linking to other pages? [15:11:08] "How to link to a user page" is rather specific. Maybe you'd want to know how to link in the first place? [15:11:40] quackgyver: ...calm down. [15:11:48] It's one of those things that should exist explicitly somewhere though, and it does, but the instructions are awful. [15:11:51] legoktm: I am calm. [15:12:08] https://www.mediawiki.org/wiki/Help:Links [15:13:23] Thanks. [15:13:28] Somebody should probably fix https://www.mediawiki.org/wiki/Help:User_page#Link_to_a_user_page [15:14:08] fix what in that? [15:14:11] that looks good to me [15:14:21] I might change the section title [15:14:26] It's not good. [15:14:31] For sure. [15:14:47] Especially considering that it's the top result on Google for my query. [15:14:51] it links to my own user page for me... [15:15:19] https://www.mediawiki.org/wiki/Help:User_page#Link_to_the_reader.27s_user_page [15:15:25] I met someone yesterday who was a tech writer. I tried to convince them to fix all our docs. I don't think i convinced them [15:15:40] Heh. [15:16:07] the section title doesn't help, that's true, but the text was pretty accurate [15:16:54] Accuracy isn't the only metric constituting whether information is helpful though. UX and IA is super important as well. [15:17:02] And from that perspective MediaWiki needs a lot of work I think. [15:17:34] quackgyver: If you have ideas on how to make it better, please feel free to improve it (Anyone can edit) [15:17:51] Yeah maybe. [15:17:52] yeah, documentation is always a TODO here... :( [15:18:01] Bug 1 [15:18:02] I don't know if I have time to learn about all the conventions [15:18:03] ! [15:18:03] Hello, I'm wm-bot. The database for this channel is published at http://bots.wmflabs.org/~wm-bot/db/%23mediawiki.htm More about WM-Bot: https://meta.wikimedia.org/wiki/wm-bot [15:18:11] But we'll see. [15:18:21] quackgyver: There are no conventions, that's half the issue ;) [15:18:27] Heh. [15:29:24] How do you set up a rewriterule that gets rid of the index.php URL parameter [15:29:33] I've tried consulting the docs, but again they're pretty terrible [15:29:43] is there a htaccess template somewhere [15:30:36] !shorturl [15:30:36] To create simple URLs (such as the /wiki/PAGENAME style URLs on Wikimedia sites), follow the instructions at or try the new beta tool at . There are instructions for most different webserver setups. If you have problems getting the rewrite rules to work, see !rewriteproblem [15:31:15] ya i read that [15:31:18] its a mess [15:33:06] also whats even the difference between example.com/Page_title and wiki.example.com/Page_title [15:33:09] they're the same thing [15:36:18] I already tried the apache rules specified there but they don't seem to work [15:38:59] there's no difference, both can render a pretty much broken MediaWiki unless configured properly [15:39:17] don't use example.com/Page_title, but example.com/wiki/Page_title [15:40:06] If there's no difference then why are they listed as two different approaches o_o [15:40:12] also I've tried every apache example provided [15:40:14] and it just breaks the page [15:40:23] as I said... [15:41:09] there are big red warnings on those sections. I'm pretty sure that tells you something [15:47:46] It doesn't though [15:47:52] rewrite rules arent a big deal (and shouldn't be) [15:48:01] I'm wondering why there isn't a simple template that you can just copypaste [15:51:21] quackgyver: actually having page titles on the root can cause a problem [15:57:16] quackgyver: http://shorturls.redwerks.org/ gives you that template