Question
I'm trying to set up TWiki Beta 20010315 on my home Lan. I have it partially set up, but I'm having trouble with registration / authentication. The first problems seemed to be related to the
MailHostBug. I fixed some of those, and I think I found another and developed a workaround for it, but someone more knowledgable than I should look at it. Unfortunately, I still cannot successfully register / authenticate.
Start of the Story:
See
CantCallMethodMail,
UnwantedAttemptToSendEmail, and
MailHostBug -- I had the same problem(s) described there and tried to manually make the fix Peter mentions at the end of
MailHostBug -- renaming MAILHOST to SNTPMAILHOST and adding SNTPMAILHOST to the
WebPreferences topic.
That seemed to help somewhat, but I still had problems.
Maybe a New Bug:
At that point I could go through the registration process and get the message that mail could not be sent using Net::Conf. (I didn't write down the message). AFAIK, I don't have Net::Conf installed, so I looked at Net.pm and guessed that $useNetSmtp = require Net::SMTP; (around line 37) was incorrectly evaluating to true. (In TWiki.cfg I have the mailProgram variable set to use sendmail.)
I think there is a problem here, and I bypassed it by setting $useNetSmtp to 0. Someone with more knowledge should take a look.
The Current Situation:
Doing that seemed to move me ahead, but I still cannot register. Here is the current situation:
- I've enabled authentication as described in the installation instructions by renaming the .htaccess file, adding "AllowOverride All" to the apache configuration file, and copying the TWikiRegistrationPub topic to TWikiRegistration. The only modification I've made to .htaccess is to specify the location of the .htpasswd file, which is /home/httpd/twiki/data/.htpasswd.
- Registration seems to complete, and I get the oopsregthanks "Thank you for registering" with "Confirmation has been sent ...".
- After registration completes, the topic RandyKramer exists. However, my name is not added to the TWikiUsers topic, nor is it added to .htpasswd. (At least once during my attempts at registering, my name was added to the TWikiUsers topic, but not on the most recent try. (I did not check until after several attempts at registration.))
- When I attempt to edit a topic, I get the dialog that prompts for the username and password, but I try entering the information three times, it fails three times, and quits.
Several months ago I successfully installed an earlier beta and I did get registration and authentication to work. I may have forgotten something I did back then, but I did not have this much trouble.
Any suggestions?
- TWiki version: 20010315Beta
- Web server: Apache Advanced Extranet Server 1.3.14-2mdk
- Server OS: Mandrake 7.2 updated with MandrakeFreq
--
RandyKramer - 03 May 2001
Answer
I found my problems and it looks like they were all of my own creation. Somehow, while fooling around looking at and editing files, I unintentionally changed the permissions on several critical files, including .htpasswd and
TWikiUsers.txt. Everything looks OK now.
I'm wondering whether this page is worth leaving here or is it better to delete it? I'm open to other opinions. I changed the permissions unintentionally because I'm a newbie to Linux, and did not think about the possibility of editing files as root changing the permissions. (At least, I assume that's what I did.)
Oops, I almost forgot -- I should leave this here as a reminder to someone (or myself?) about the possible problem related to $useNetSmtp = require Net::SMTP; (around line 37) of Net.pm. Is it a problem? I guess I can go back and undo my change and see what happens.
--
RandyKramer - 07 May 2001
OK, I undid my changes to line 37 or Net.pm. I still get the message ~"can't send mail using Net::SMTP" after registration, but registration is successful and I can successfully edit pages. It looks like all my registration problems were due to file permission or ownership issues.
I now sort of recognize that Net::SMTP is something like a function (or method of an object?) in the module (object?) Net.pm. I still suspect there is a problem because even though I specified that I wanted to use sendmail (by setting $mailProgram in TWiki.cfg), twiki gives me the message about not being able to send mail using Net::SMTP. For now it is a low priority item for me since I don't have mail set up on this box anyway. To try to state it more clearly, I have to tweak file Net.pm around line 37 to get what seems to be a more appropriate message about not being able to send mail using sendmail. (More appropriate because I specify in TWiki.cfg that I want to use sendmail.)
I'll look at this entire message again in a week or so and try to "refactor" it.
--
RandyKramer - 08 May 2001
The spec will be changed so that sendmail has preference over Net::SMTP in case it is set in the config file. More in
Codev.NetSMTP
--
PeterThoeny - 11 May 2001
I would say leave this page. I had to do the same thing on line 38 Sept2001 release in the Net.pm That is change $useNetSmtp= require Net::SMTP to $useNetSmtp=0. This seemed to allow me to now have my users receive the confirmation e-mail properly and be entered on the
TwikiUsers page. (Net::SMTP is not on my system but I had set the mail program to be sendmail) For whatever reason, the system was still trying to load Net::SMTP despite what I thought was proper config of sendmail.
--Main.BobCarter --9 Nov 2001
This problem is discussed on other pages including:
Some people have solved the problem by making a change around line of the 38 Sept2001 release in file Net.pm -- they changed $useNetSmtp= require Net::SMTP to $useNetSmtp=0.
Other people have solved the problem by commenting out the test for Net::SMTP in TWiki::Net around line 164 (probably line 187 in your case):
eval {
# $useNetSmtp = require Net::SMTP;
}
An attempt was made to solve this problem in the main release (IIRC) but it seems to keep cropping up.
--
RandyKramer - 01 Apr 2002