[08:03:34] legoktm: ping: https://gerrit.wikimedia.org/r/#/c/326317/ :D [09:34:18] Is there any GCI mentor? [09:35:57] how do i get full page url (from a page name) using javascript without doing an api query if possible? [09:39:30] hello, i am trying to install mediawiki but got struck . Need help [09:40:19] ? [09:40:34] sucode_: Whats wrong [09:41:45] rlot: http://pastebin.com/nXYgA0XK [09:41:52] this step [09:42:27] You are installing it on linux server? [09:42:40] i am on ubuntu 16.04 [09:43:07] You have apache server instaleld/ [09:43:09] ? [09:43:47] yeah i get apache info when i open localhost on my browser [09:44:12] So copy your mediawiki to /var/www/html [09:44:31] .tar.gz or the unzip on ? [09:44:43] Unzip it to /var/www/html [09:45:06] Name the folder, for example 'w' [09:45:23] (so your wiki adress will be localhost/w) [09:45:28] (so your wiki adress will be localhost/w/index.php) [09:52:09] rlot: till now i got the page, it said to install xml, but the link to installation of xml said that it is enabled by default [09:52:50] Run composer install [10:02:29] rlot: ran composer in /var/www/html/w and restart apache2, still getting same error [10:02:30] https://s29.postimg.org/8sux9eoyf/Screenshot_from_2016_12_11_15_32_08.png [10:08:35] rlot : are you there ? [10:09:08] Oh, install xml in your system [10:09:53] sudo apt-get install php5-xml [10:12:33] Unable to locate package php5-xml [10:12:44] terminal response [10:15:20] i done php7.0-xml and it worked [10:16:20] So restart apache [10:26:49] hello. I ran into an issue with malformed UTF-8 from a Wikipedia database dump. Is is possible by design for MediaWiki to contain such data? (md5sum checks out) [10:38:04] Well, I've been able to locate the faulty byte. `(914861,0,'1911_Encyclop�dia_Britannica',2)` Probably just a hardware-induced error that made it into the dump. Surrounding duplicates of the title seem fine. [11:34:47] rlot: i need help [11:40:40] sucode_: Ok, i'm back [11:41:21] Cannot access the database: Access denied for user 'root'@'localhost' (using password: NO) (localhost). [11:41:22] Check the host, username and password and try again. [11:41:35] when configuring database [11:41:56] You have installed mysql? [11:42:06] yeah [11:42:11] Is password set? [11:42:22] Maybe you accidentally set your root password [11:42:32] yeah [11:42:46] i set root password [11:43:08] So setup it in wikimedia [11:44:54] rlot: thanks [11:45:22] for strage engine: innodb or myisam ? [11:45:42] database character set binary or utf-8 ? [11:50:14] innodb [11:50:19] utf-8 [11:50:39] oh i went for binary !! [11:50:42] (Its your configuration, just use defaults) [11:50:46] ok [11:50:51] I was just about to ask the same quesiton [11:50:54] It doesnt matter too much [11:50:56] UTF-8 or binary [11:51:17] I was born in the 70's so I'm used to going with UTF-8 if possible [12:12:36] Now I'm a bit perplexed.. [12:12:50] Installation asks for place for deleted images [12:13:06] defaults to '/var/www/wiki.study/www/w/images/deleted' with my settings [12:14:21] I'm guessing there is something that is stopping the Internet from viewing that 'deleted'-directory even if it is under document root' [12:18:21] jubo2: an .htaccess probably. Files are also stored with filenames as hashes, not the original filename, so as long as there's no directory index, it's impossible to guess the correct URL to find a deleted image [12:18:47] Vulpix: hmm.. interesting approach [13:09:04] Okkk... [13:09:19] I set the deleted images dir somewhere where Internet cannot see it [13:09:36] Now I have virgin 1.28 installation at http://wiki.study/w/index.php/Main_Page [13:10:31] I check that the www-data has write rights to the deleted files dir, backup both the static files and the database before trying to move in the stuff from http://GloBBA12.si/wiki/ [13:11:49] SHould I give this a spin http://shorturls.redwerks.org/ ? [13:12:44] or just do it the old fashioned way like I've done it for a decade and manually set the params for pretty 'pedia-style URLs [13:14:36] Vulpix: afaik, the hash is a hash (the first two chars of either md5 or sha1) of the filename unsalted [13:15:09] there're known algorithms to get the path with just a filename [13:35:08] I'd agree with zhuyifei1999_ [13:35:33] In uni they told us that the *NIX crypt just takes 2 bytes of plaintext password for the salt [13:35:44] so, do the right thing and set the deleted path somewhere outside of the published root directory [13:36:06] I fumbled up.. I forgot where I set the deletables dir to [13:36:21] It was outside of /var/www for sure [13:36:54] where can I find that info? Or do I just upload a pic, delete the pic and look what it complains [13:37:20] what info? [13:37:58] Vulpix: The directory where the deleted files go to.. www-data needs write rights to it [13:38:30] MediaWiki creates an .htaccess at the root of the deleted directory with a "Deny from all" directive [13:38:50] Vulpix: that makes sense [13:38:51] jubo2: https://www.mediawiki.org/wiki/Manual:$wgDeletedDirectory [13:40:34] Vulpix: how can I query the value of $wgDeletedDirectory ? [13:41:09] die("wgDeletedDirectory is $wgDeletedDirectory"); [13:41:32] or use eval.php [13:43:04] uhh... I honestly don't understand either of those routes [13:51:57] the $wgDeletedDirectory is not in LocalSettings.php but somewhere it must be [13:52:11] database or flat file [13:52:50] in DefaultSettings, obv :) [13:53:42] Vulpix: okk thanks [13:56:52] Vulpix: It just has a 'false' boolean [13:57:18] How about I just choose some directory and manually set the $wgDeletedDirectory [13:57:30] So it'll if ( $wgDeletedDirectory === false ) { [13:57:30] $wgDeletedDirectory = "{$wgUploadDirectory}/deleted"; [13:57:31] } [13:58:19] but it is not empty afaik [13:58:37] because I gave it an value during the installation process [13:58:46] Well, if it's not in your LocalSettings [13:58:47] You didn't [13:59:09] Okk. I'll add that if statement to LocalSettings.php [13:59:30] three equals signs? [13:59:34] never seen that [13:59:51] does it mean something or is it a typo Reedy? [14:01:11] no it's not a typo [14:01:18] https://secure.php.net/manual/en/language.operators.comparison.php [14:01:23] TRUE if $a is equal to $b, and they are of the same type. [14:01:42] gotcha [14:02:20] Hello everyone [14:02:26] jubo2: even if you set $wgDeletedDirectory, it can be overridden by setting $wgLocalFileRepo https://www.mediawiki.org/wiki/Manual:$wgLocalFileRepo [14:02:51] Is @jdlrobson or @d3r1ck online right now? [14:04:42] divadsn: they're both in the channel with those same nicks :) but idle, probably afk [14:32:11] Vulpix: I'm back from dinner [14:32:28] getting a blank page where wiki should be [14:32:46] Maybe the .htaccess is not being processed [14:33:10] in /var/www/consumerium.org/develop/w/.htaccess [14:33:38] I could put that stuff into the VirtualHost directive as well since there are no other users on this machine [14:34:10] jubo2: the server's error log will tell you what's the problem, but yes, I prefer to use server directives when possible [14:34:12] I (think) I need to let the .htaccess override [14:34:32] Vulpix: and the server's error log would be.. somewhere..? [14:34:56] it depends on the software being used, custom configuration... [14:35:15] Debian Stable / Apache 2.4 [14:35:54] !lmgtfy debian apache error_log location [14:35:54] http://lmgtfy.com/?q=debian+apache+error_log+location [14:40:40] nope.. no info there [14:41:00] I better enable the MediaWiki debugging [14:42:12] that won't help if PHP isn't even executing MediaWiki (due to bad .htaccess directive or parse error) [14:43:15] Vulpix: I'm going with what I got from http://shorturls.redwerks.org/?source=userdata&url=http%3A%2F%2Fwiki.study%2Fw%2Findex.php%2FMain_Page&server=apache&mod_php=1&script=%2Fw%2Findex.php&fcgi_pass=127.0.0.1%3A9000&hashed_uploads=1&articlepath=%2Fon%2F%241&thumb_handler=on [14:44:07] what does say apache error_log? [14:44:19] nothing of interest [14:45:10] are you sure? [14:45:24] oh.. here is something maybe of interest [14:45:27] ::1 - - [11/Dec/2016:13:28:42 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.10 (Debian) (internal dummy connection)" [14:45:38] I don't understand what that means [14:45:58] this is access_log, not error_log! [14:46:05] whoops. sorry [14:47:08] nothing wrong there [14:47:32] except there hasn't been anything written to it in a half an hour [14:47:51] I looked at it with 'tail -f' [14:48:53] hmm, strange, you said config was inside a virtual host section? sometimes virtual host sections are configured to log to a different file [14:49:41] see if in /var/log/apache2/ there's a log file looking like it might be the error log for that [14:49:41] yes [14:50:31] also came to my mind that the .htaccess not probably being processed by default because existence of stupid people [14:50:47] i.e. to protect the stupid people from their own stupidity [14:50:55] lol [14:52:08] vhost error log is empty and access log is showing some spiders [14:53:33] did you edit any php file that could be causing the error? [14:54:43] not afaik [14:55:20] I try putting the .htaccess stuff straight into the VirtualHost directive [14:55:26] maybe that'll solve it [14:55:52] if the error is in php, depending in how php is being executed, it may not get logged in the apache's error log but it's own (if configured in php.ini) http://stackoverflow.com/questions/5127838/where-does-php-store-the-error-log-php5-apache-fastcgi-cpanel [14:59:35] now I'm noticing a missing rewrite engine [15:11:05] activating it didn't help [15:14:39] I put the stuff from the .htaccess onto the VirtualHost and now it doesn't complain 404 [15:14:47] just gives a blank page [15:15:17] I need to enable some debugging in MediaWiki to see what's stopping it from working [15:16:25] jubo2: add an error_log directive to php.ini pointing to a new file in /var/log/apache2/ for example, I'm pretty sure blank plages is because of PHP, not apache misconfiguration [15:28:06] Vulpix: yeah.. I guess you are right.. There are so many instructions around on how to do things and they do things differently and the result is a mess I cannot get to work [15:28:24] I revert to clean 1.28 now and try manually [15:30:05] jubo2: but have you managed to get an error log to know at least what's the problem? a working error log is a must, or else you'll have to start from scratch every time (and it doesn't guarantee it will make things work) [15:30:52] okk [15:33:20] Vulpix: butbutbut... all the WordPress are working fine [15:33:43] So php must be working right.. at least to some degree [15:34:27] yes, but if you've edited LocalSettings.php and introduced an error, your MW installation just blows [15:34:52] Vulpix: ah i c [15:35:11] and you must get a descriptive error message somewhere to know what's going on [15:36:46] if you can't manage to get an error log, you can try https://www.mediawiki.org/wiki/Manual:How_to_debug#PHP_errors, but you'll have to set that in php.ini in case there's a syntax error preventing LocalSettings from being executed at all [15:41:58] Vulpix, I know and thats the problem, my task is submitted for review since Friday night :/ [15:43:55] Vulpix: I set error logging in /etc/php5/apache2/php.ini but nothing seems to being written to it [15:44:20] jubo2: did you restarted apache after changing that? [15:44:30] no. good point [15:46:09] that didn't affect it [15:46:23] I did a 'chmod a+w' on it [15:46:34] maybe something will be written to it now [15:55:33] Reedy, this describes perfectly how my work is done at home, thanks ^^ https://stackoverflow.com/questions/20958888/preserving-file-permissions-for-samba-shares-when-file-is-edited [15:55:40] heh [15:55:50] are you on windows? [15:56:24] Using ExpanDrive (over SFTP) might stop the problems... Not free software, but pretty useful [15:56:32] Yes, I am using Windows on my main machine and Linux on my test machine (laptop) [15:57:08] Reedym, naah, it would only complicate things using Atom I think, Samba shares are ok ;) [15:59:13] Vulpix: Now I removed the 'if' sentence and just set the deleted dir and now I get some action from the ssystem http://wiki.study/on/Main_Page says "Not found" [16:00:06] you deleted the rewrite rules, didn't you? [16:00:13] http://wiki.study/ [16:00:34] I incorporated them into VirtualHost [16:01:15] they aren't working, then [16:01:41] RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L] --> that should prevent displaying a directory index when looking at the root directory [16:19:43] Vulpix: This is my /etc/apache2/conf-available/mediawiki.conf activated with 'sudo a2enconf mediawiki' http://paste.debian.net/901693/ [16:20:03] I go for twenty minute walk now.. My brain needs it [16:22:42] these are annoying cases where something small somewhere is slightly wrong [16:25:34] jubo2: http://serverfault.com/questions/12968/how-to-find-out-which-httpd-conf-apache-is-using-at-runtime [16:31:30] andre__: Did we run out of instances of the join IRC beginner task? [16:31:47] Niharika: likely. Haven't checked yet today [16:32:03] andre__: Okay, I got pinged about it. [16:32:23] We ran out of IRC nicknames! :D [16:32:29] (just kidding) [16:36:55] :P [17:00:05] Okk.. [17:00:15] took a 20 minute breather [17:00:30] proceeded to install clean 1.28 [17:01:14] last time I tried to follow what http://shorturls.redwerks.org/ said but that did not work for some reason [17:02:22] Maybe I should try manually with these instructions https://www.mediawiki.org/wiki/Manual:Short_URL/Apache [17:03:58] I 'cp LocalSettings.php LocalSettings.php.untouched' [17:05:55] jubo2: redwerks.org rules seemed correct, but apache was just ignoring them [17:06:14] I wonder if that config file is being read at all by your apache [17:07:17] jubo2: in fact, I'd say those rules should go inside the directive of the wiki and not on the general config file [17:27:11] Vulpix: partially advanced on the thing [17:27:28] I gave the redwerks.org another go [17:27:55] but this time I selected to generate the code for root access, not normal user access [17:28:37] so now http://wiki.study/regarding/Main_Page is up and looking good. Next hurdle is to get all the content imported [17:29:21] Thanks for your patient help Vulpix. I'm not very technically adept but I try [17:31:31] :) [17:31:44] what was the problem with rewrite rules?