Topic on Project:Support desk

Hansie (talkcontribs)

Dear Member,

The wiki

http://www.newyorkweb.co/wiki

has a lot of unclear contributions of doubtfull users.

It might be because of a bot or so.

How can I verify the IP addresses of the users or contributions?


Thank you.

Hansie

Florianschmidtwelzow (talkcontribs)

Oh yeah, that's called "normal spam" problem :D You should consider to use some extensions to avoid these spam bots to from editing and/or registering on your wiki. Read the Manual:Combating_spam to know how to do what :) The first step yould be some good captcha ;)

Hansie (talkcontribs)

Thank you Florian!

It was easy to implement ReCaptha, but an error while registering :

"

New York City could not send your confirmation mail. Please check your email address for invalid characters.

Mailer returned: Policy restriction in effect. The fifth parameter is disabled on this system

".

But a confirmation mail was send. I used a normal e-mail address.

What's wrong?

Hansie

Florianschmidtwelzow (talkcontribs)

Hello! This error comes, because your hoster hosts php in safe_mode. In this mode, php's mail() function will return false with a warning when called with the fifth parameter (MediaWiki uses this parameter iirc) which MediaWiki interprets as an error while sending the e-mail (and add the above error message), see the Manual for more information.

You should ask your hoster to disable the completly senseless safe_mode. This function is deprecated in php 5.3 and removed in 5.4 anyway.

Hansie (talkcontribs)

Florian,

I got 2 responces from my webhoster:

1 The issue is that we only allow 4 parameters and you seem to be using 5. You need to make sure that you use only 4 parameters when sending the email.

2 Also Safe Mode is disabled on our servers by default.

I got also the next information: PHP Version 5.3.29 : http://www.one-docs.com/php5/ : safe_mode Off Off.

Hans

Florianschmidtwelzow (talkcontribs)

Hello!

The 5. parameter is an official parameter documented on the php.net Manual page, so i don't think, that the developers will remove or implement a workaround for this; most hosters allow 5 parameters. So i would suggest to ask your hoster, why they block additional paramters to the mail() function.

You can try to open a bugreport in bugzilla (BUGREPORT), but i think it doesn't have much success.

Hansie (talkcontribs)

Hello Florian!

This is the response of my hoster (one.com):

Abizar: The fifth parameter in our php.ini file
Abizar: it cant be enabled
Hansie: How, where can I do so?
Abizar: it seems MediaWiki requires 5 parameters to run in mail () , which we do not support
Abizar: please check with them for a workaround this
Abizar: because we cant enable it
Abizar: this feature.
Hansie: The expert doesn't think, the developers will remove or implement a workaround (See text)
Abizar: i am sorry, but there is no alternative solution for this .Because e fifth parameter is disabled for mail()
Abizar: it cant be enabled

Thank you.

Hansie

Florianschmidtwelzow (talkcontribs)

Wow, cool reason ;) Now, you have two possible solutions:

  1. Change the hoster
  2. Open a bug and hope, that someone can and will implement a workaround
88.130.71.190 (talkcontribs)
"We cant, because we can't. And it's disabled and we cant"

Would make a nice rap song...

No, hosters who arbitrarily disable stuff make running a system like MediaWiki really hard. If you want to, just for fun, you can ask him, how much you have to pay for them to enable it. Then you will see, what they really can't...

=> Change the host!

Hansie (talkcontribs)

Dear Member, Hello Florian,

Do you know a "mediawiki-friendly" hoster?

Thank you,

Hansie

MarkAHershberger (talkcontribs)

You can also try this troubleshooting tip. The mail pear module that it suggests using won't use the fifth parameter if safe_mode is in use.

Hansie (talkcontribs)

Hello Mark,

Thank you for your response.

I have a few questions about the troubleshooting tip:

First:

$wgSMTP = array( ...

       'username' => 'yourEmailAccount@gmail.com',

...

Is this vulnerable to spam?

Secondly:

" Then install the packages required to send the mail.

$ sudo pear install mail
$ sudo pear install net_smtp "

Where can I find the packages? Where should I install them?

Thank you in advance.

Hansie

MarkAHershberger (talkcontribs)

1) it isn't vulnerable to spam. You would have to set that to your user name (which may mimic your email address). This isn't revealed to anyone.

2) If you don't have command line access, then you can download the Net_SMTP and Mail pear packages and put the extracted contents in a directory included in a the php include path.

Hansie (talkcontribs)

Mark, Dear Member,

The Error is gone, but did I apply the right solution?

1 From "Net_SMTP" I took net_smtp.php and put it in ../includes/net_smtp

2 From "Mail" I took mail.php and put it in ../includes/mail

I added in LocalSettings.php :


$wgSMTP = array(

       'host' => 'mailout.one.com',
       'IDHost' => 'one.com',
       'port' => 25,
       'username' => ,
       'password' => ,
       'auth' => false

I used no username and password.

Is it oké this way?

Thank you.

Hansie

MarkAHershberger (talkcontribs)

Is it working? Putting the files in place the way you did didn't do anything -- you should be able to remove them and it should continue working.

Hansie (talkcontribs)

It is not working.

"you should be able to remove them and it should continue working."

I should remove them?

But why this is adviced by the troubleshooting tip:

"
Then install the packages required to send the mail.

$ sudo pear install mail
$ sudo pear install net_smtp
"

Hansie (talkcontribs)

Mark,

I removed them and it's working.

Thank you.

hansie

Reply to "Bot or so?"