Extension talk:Read Restrict
Add topicGood Workaround
[edit]I'm wondering if this type of setup could be extended to include 3 or more simultaneous wikis...?
I have never tried. However my interpretation of the documentation $wgSharedDB
is that it is possible to use more then two. Let us know. -- Suki 02:21, 29 April 2007 (UTC)
extension explained
[edit]I am having trouble understanding your instructions, mainly because I do not understand the commands you are using. ie. prompt$ mv config/LcalSettings.php where do I type that? I am trying to figure out a way to do it just by editing files and creating directories in a normal way.
- Those are Unix style shell commands. They change the permissions of files and directories and move files. In explaining a typical installation for many products the larger user base is running some kind of Unix OS which has a Unix Shell equivalent.[1] Most commands can be translated to a Microsoft variant (DOS Command Line)[1].
- Without knowing what you consider normal is I cannot postulate what would be the correct instructions for your system. Were you referring to an FTP session? I'll attempt to re-word the commands for what they do so others who do not use a Unix Shell can understand what is happening. I apologize for the vagueness and my assumptions. --Suki 13:09, 10 June 2007 (UTC)
I am trying to understand your directory structure: Bouncingmolar 22:11, 5 May 2007 (UTC)
For clarification: (Suki 13:09, 10 June 2007 (UTC))
Incorrect | Correct |
---|---|
|
|
Retraction
[edit]- ↑ In searching exhaustively I was unable to find a reference that corroborated my opinion. Although I could assume the statement as an observed possibility I would like to retract the implication that UNIX is more suited or preferred then other non-UNIX Operating Systems.
installation for Noobs
[edit]I am a Noob. Thanks suki for the explanation. It was helpful. I have now figured out what the commands mean. I had to allow SSH telnet on my host, so that I could enter those shell commands. What i was originally asking (which is now irrelevant) was whether I could just modify some of the files by editing them instead of installing patches and using unix commands... but don't worry its now clear :) Bouncingmolar 12:40, 12 June 2007 (UTC)
Logging in one will not log into the other
[edit]After I finished the step Using_the_same_user_table, I found that Logging in one will not log into the other.
Using ($wgSharedDB
) is the way allowing wikis to only share same user table. Since each wiki uses different cookies, Logging in one will not log into the other until they share the same cookies. If we want the wikis to use the same cookies, we have to make different wikis use the same site name and database. right?--Roc michael 01:27, 13 May 2007 (UTC)
- This may very well be true. I know on all the test cases I played with I had both wiki's under the same document root. I did try once to have the two sites on seperate domains and things did work (Don't remember what part didn't; perhaps it was what you described above). --Suki 13:11, 10 June 2007 (UTC)
UserCan Extensions
[edit]With the new MediaWiki 1.10 versions the userCan hook is much more suited for security then the previous versions. And it's use in the case described by the ReadRestrict article could be isolated to not include the Wiki family portion.
It is a good example walk though but I was thinking the actual ReadRestrict.php code could be a separate entity and need not be directly associated the the described Wiki family setup. Thoughts? Suki 17:55, 13 June 2007 (UTC)
500 Server Error
[edit]firefox: "A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again." I get this error when I try to access the wiki_family directory to set up the 2nd wiki. I can't load the installation file. Any ideas? Bouncingmolar 08:12, 16 June 2007 (UTC)
- I tried copying the index.php from main_wiki/config to the wiki_family/config and i didn't receive the error when I loaded wiki_family/config/index.php . I could then move localsettings.php into the wiki_family directory, however i get the 500 server error again when trying to load wiki_family after that. My server doesn't like interlinking maybe? Bouncingmolar 08:58, 16 June 2007 (UTC)
- I also contacted support on my host: "[Thu Jun 14 13:30:12 2007] [error] [client] Premature end of script headers:/public_html/wiki_family/index.php. I checked your symlinks and folder permissions. All looked according to the instructions (folders already 755, etc.). I even checked the dB tables to ensure there were no table prefixes. I don't know what the problem is, sorry." Bouncingmolar 09:07, 16 June 2007 (UTC)
- This seems to be a problem with your installation. There is not enough information available to postulate a possible culprit. I would suggest attempting to install two separate MediaWiki installations and not symlink the two. you will have to duplicate all changes (extensions, skins, etc.) The interlinking portion will work regardless if you symlink or not. And technically if both systems can access the same database server the two need not be on the same machine let alone same account. Hope this helps. Suki 20:00, 16 June 2007 (UTC)
- Damn ... Ok I will try that. what info would you need to find out the problem anyway?
- I set the first wiki up and changed config permissions to 755 and moved the
localsettings.php
- I set the first wiki up and changed config permissions to 755 and moved the
[~]# cd public_html [~/public_html]# mkdir family_wiki [~/public_html]# \cd family_wiki # Remove the back slash [~/public_html/family_wiki]# ln -s ../main_wiki/* . [~/public_html/family_wiki]# rm LocalSettings.php config images [~/public_html/family_wiki]# mkdir images [~/public_html/family_wiki]# chmod 777 images [~/public_html/family_wiki]# mkdir config [~/public_html/family_wiki]# chmod 777 config [~/public_html/family_wiki]# cd config [~/public_html/family_wiki/config]# ln -s ../../main_wiki/config/index.php . # Don't forget the period
mediawiki 1.10.0, PHP: 5.1.6 OS:Linux. Kernel version:2.6.20-7_1.BHsmp. Apache version:1.3.37 (Unix)
- Bouncingmolar 01:23, 17 June 2007 (UTC)
- The above should work as described. Could there be a missing FollowSymLinks directive in your Apache confing?[2]
- Suki 04:42, 21 June 2007 (UTC)
InterWiki Linking
[edit]Sorry I'm being a pain... I couldn't get the symbolic links to work so I've followed your suggestion and set up two wikis. I've opened phpMyAdmin but i'm stuck again.
INSERT INTO `sukiwiki1`.`interwiki` ( `iw_prefix` , `iw_url` , `iw_local` , `iw_trans` ) VALUES ( 'family', '../family_wiki/index.php/$1', '1', '0' );
I'm stuck because i'm not sure what sukiwiki1 means. what do i replace it with. I'm Noob sorry. It seems to work without the sukiwiki1 part Bouncingmolar 03:57, 19 June 2007 (UTC)
- I might not have been able to follow the sql instructions but i figured out how to manually edit the tables :) Bouncingmolar 04:04, 19 June 2007 (UTC)
- when i use [[family:a_page_name]] it takes me to the family_wiki main page. Is it because my urls still show the title= in the url ie. wiki_family/index.php?title=a_page_name - Bouncingmolar 04:22, 19 June 2007 (UTC)
- yes it is because i use long url's I am struggling with making the short url .htaccess work so for the mean time i changed the value to 'family', '../family_wiki/index.php/?title=$1', '1', '0' Bouncingmolar 06:05, 19 June 2007 (UTC)
- oh yeah... i got it working... pity i can't figure out the symbolic link thing. Bouncingmolar 15:41, 19 June 2007 (UTC)
- yes it is because i use long url's I am struggling with making the short url .htaccess work so for the mean time i changed the value to 'family', '../family_wiki/index.php/?title=$1', '1', '0' Bouncingmolar 06:05, 19 June 2007 (UTC)
- when i use [[family:a_page_name]] it takes me to the family_wiki main page. Is it because my urls still show the title= in the url ie. wiki_family/index.php?title=a_page_name - Bouncingmolar 04:22, 19 June 2007 (UTC)
- I very glad you got that working. Suki 04:42, 21 June 2007 (UTC)
Read restrict and Mediawiki 1.12
[edit]After upgrading I get this message if I don't comment out the line " require_once ("extensions/ReadRestrict.php");"
Bouncingmolar 08:14, 14 July 2008 (UTC)
Internal error Detected bug in an extension! Hook adminAuthUserCan failed to return a value; should return true to continue hook processing or false to abort.
- I think a comment on your readrestrict.php alluded to this solution, but commenting out the following line in the readrestrict.php fixes the problem
# Add the hook to userCan
$wgHooks['userCan'][] = 'familyAuthUserCan';
- Bouncingmolar 08:35, 14 July 2008 (UTC)