Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: steever on May 07, 2008, 05:53:03 AM
-
Hello. Has anyone been able to authenticate mediawiki against SME's POP3 or IMAP servers in the way it's possible to auth moodle or groupoffice?
Thanks
Steve
-
Maybe not a big help, but I'm using http://www.mediawiki.org/wiki/Extension:PwAuthPlugin , and works well.
-
How do you manage to auth against SME using this? I'd love to know ...
-
How do you manage to auth against SME using this? I'd love to know ...
It is not that much different I guess as stated in that page, you will have to put the files in the proper place as well as setting up your configuration properly in the LocalSettings.php page.
The instructions seem pretty straight forward to me. Did you already have a go at it? If so tell us where you had problems, otherwise I suggest you just start and see how it turns out.
-
OK guys: this is how far I got ...
- Installed mediawiki as per instructions in the SME wiki.
- Made changes to /opt/mediawiki/LocalSettings.php as per instructions on the extension's page.
- Copied the code on the extension's page and placed it in a new file called PwAuthPlugin.php located in the extensions folder in /opt/mediawiki as per instructions.
- Got a blank page when looking at http://servername/mediawiki
HF, what did I do wrong?
Steve
-
OK guys: this is how far I got ...
- Installed mediawiki as per instructions in the SME wiki.
- Made changes to /opt/mediawiki/LocalSettings.php as per instructions on the extension's page.
- Copied the code on the extension's page and placed it in a new file called PwAuthPlugin.php located in the extensions folder in /opt/mediawiki as per instructions.
- Got a blank page when looking at http://servername/mediawiki
HF, what did I do wrong?
Steve
Judging from the instructions... not much. Perhaps it is time to look at your logfiles to see why you get a blank page, see if you find a clue in /var/log/httpd/error_log or /var/log/messages. Perhaps you caould also enable display errors while debugging the application as described in the wiki on the PHP page (http://wiki.contribs.org/PHP).
-
I see some trouble in the messages log ...
May 7 21:58:08 server001 httpd: PHP Fatal error: main(): Failed opening required './LocalSettings.php' (include_path='.:/usr/share/pear-addons:/usr/share/pear') in /opt/mediawiki/index.php on line 78
May 7 21:58:08 server001 httpd: PHP Warning: main(./LocalSettings.php): failed to open stream: Permission denied in /opt/mediawiki/index.php on line 78
What do you think is the problem?
-
I see some trouble in the messages log ...
What do you think is the problem?
It has problems finding the LocalSettings.php file. Are you sure you placed it in the proper place and have the correct filename?
What does line 78 of index.php state?
-
Line 78 of index.php says "require_once( './LocalSettings.php' );"
LocalSettings.php was an existing file in the same folder as index.php.
All I did was add the code to the file.
-
Line 78 of index.php says "require_once( './LocalSettings.php' );"
LocalSettings.php was an existing file in the same folder as index.php.
All I did was add the code to the file.
I quickly installed on my test server as well and did not have the error you are receiving, where did you paste the code in LocalSettings.php, beginning or at the end? Between the <?php ... ?> tags?
I pasted mine at the end, just before the php close tag (?>). My bottom section of the LocalSettings.php file now reads:
# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );
require_once("./extensions/PwAuthPlugin.php");
$wgAuth = new PwAuthPlugin();
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['createtalk'] = false;
$wgShowIPinHeader = false; # For non-logged in users
?>
One other thing you will have to change after you pasted the code at the proper place is change the location of the pwauth file in the ./extensions/PwAuthPlugin.php file as SME Server stores it in a different location, you should change
$pwauth_bin_path = "/usr/local/libexec/pwauth";
to
$pwauth_bin_path = "/usr/lib/httpd/modules/pwauth";
After placing the code at the proper place and modifying the pwauth location I was able to succesfully login using a already configured username.
-
Thanks Cactus:
It was the $pwauth_bin_path = "/usr/lib/httpd/modules/pwauth";
part that I didn't have. Did I miss that in the instructions somewhere?
-
Thanks Cactus:
It was the part that I didn't have. Did I miss that in the instructions somewhere?
That line is in the code you copied to ./extensions/PwAuthPlugin.php file, but the installation is not SME Server specific and SME Server handles some things a bit different, which is not unusual for Linux distributions in general.
I specifically pasted the line it is in the original version and the version you should change it to. If it was not there you must have made an error on copy-pasting and I guess you are missing more lines if that is the case.
-
The original version was there, but how did you know to change it? Did I miss that instruction somewhere?
Steve
PS. I'll add the above info to the wiki so everyone can enjoy.
Thanks
-
The original version was there, but how did you know to change it? Did I miss that instruction somewhere?
No it was not there, I just know a lot of SME Server by now and quickly tested it for you.
PS. I'll add the above info to the wiki so everyone can enjoy.
You could do so, but remember that the page in the wiki is about the contrib, I suggest you mak a new page in the Category:Howto and post a link to it on the page dedicated to the contrib.
I will see if I can incorporate the pwauth authentication in the contrib as well. Makes installation and configuration a lot easier.
-
Thanks.
I will hold off from editing the wiki until you make modifications.
Steve
-
Thanks.
I will hold off from editing the wiki until you make modifications.
Steve
No, please go ahead and make the new page for MediaWiki:PWAuth (http://wiki.contribs.org/index.php?title=MediaWiki:PWAuth&action=edit) (just follow the link) and add a link to it on the Mediawiki page when you added your instructions there.
Implementing the rest will take a lot more time and effort than your documentation. I will review, when you created the pages, and when I am done incorporating it in the contrib will modify the wiki accordingly.
-
Even though I'm logged into the wiki, the page is locked.
-
Even though I'm logged into the wiki, the page is locked.
I noticed as the MediaWiki namespace can not be used, I should have known. Use this one (http://wiki.contribs.org/MediaWikiPWAuth?action=edit) instead.