Post by kenny_1892 » Sat Sep 18, 2010 4:56 pm

Hi,

I'm getting the following error after a customer signs up to my site. Does anyone have any advice on to fix this problem please.

Warning: mail(): Policy restriction in effect. The fifth parameter is disabled on this system in /customers/battling-ropes.com/battling-ropes.com/httpd.www/system/library/mail.php on line 151Warning: Cannot modify header information - headers already sent by (output started at /customers/battling-ropes.com/battling-ropes.com/httpd.www/index.php:92) in /customers/battling-ropes.com/battling-ropes.com/httpd.www/system/engine/controller.php on line 27

Thanks
Kenny

New member

Posts

Joined
Wed Aug 04, 2010 6:11 pm

Post by i2Paq » Sat Sep 18, 2010 5:36 pm

This looks like it is related to your host/server setup in relation to php-safe mode.
Ask your hoster.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by kenny_1892 » Sun Sep 19, 2010 4:55 pm

Hi,

Thanks for the reply. I just spoken to host and they say thy aren't running in safe mode. Do you have any other ideas of what might be wrong.

Thank you

New member

Posts

Joined
Wed Aug 04, 2010 6:11 pm

Post by i2Paq » Sun Sep 19, 2010 5:06 pm

kenny_1892 wrote:Hi,

Thanks for the reply. I just spoken to host and they say thy aren't running in safe mode. Do you have any other ideas of what might be wrong.

Thank you
I still think it is related to the way your server has been setup.

Is the e-mail system working and do mails get send?

I've used Google for that error and found something familiar on Drupal.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by JAY6390 » Sun Sep 19, 2010 5:13 pm

While they might not be running in safe mode, they've put a restriction on your mail function (as described in the error message). You can try removing the fifth parameter but I'm not sure as to the exact implications it will have on your emails being sent out
Open

Code: Select all

/system/library/mail.php
find

Code: Select all

                mail($to, $this->subject, $message, $header, $this->parameter); 
and change it to

Code: Select all

                mail($to, $this->subject, $message, $header); 
Be sure to make a backup of the file before doing this

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by kenny_1892 » Sun Sep 19, 2010 6:07 pm

JAY6390 wrote:While they might not be running in safe mode, they've put a restriction on your mail function (as described in the error message). You can try removing the fifth parameter but I'm not sure as to the exact implications it will have on your emails being sent out
Open

Code: Select all

/system/library/mail.php
find

Code: Select all

                mail($to, $this->subject, $message, $header, $this->parameter); 
and change it to

Code: Select all

                mail($to, $this->subject, $message, $header); 
Be sure to make a backup of the file before doing this
Thanks this worked

Kenny

New member

Posts

Joined
Wed Aug 04, 2010 6:11 pm

Post by avantls » Fri Aug 24, 2012 7:33 pm

Hi There,

I am with one.com they told me they only allow 4 parameters as previously mentioned.

I took out the bit as above, as they gave me the same advice after about 1 hour of chat.

I had no idea what I was doing, but worked perfectly. Thank you for the advice, I should of done that in the first place. Would of saved the hour of abuse to one.com lol

Newbie

Posts

Joined
Thu Aug 02, 2012 4:27 am

Post by Daniel » Fri Aug 24, 2012 10:17 pm

i'll update the code to account for this.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Fri Aug 24, 2012 10:18 pm

looks liek it was already taken care of:

if ($this->parameter) {
mail($to, '=?UTF-8?B?' . base64_encode($this->subject) . '?=', $message, $header, $this->parameter);
} else {
mail($to, '=?UTF-8?B?' . base64_encode($this->subject) . '?=', $message, $header);
}

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by LarsV » Tue Oct 30, 2012 2:19 am

I know this an old tread, but it's still actual, I'm running on one.com as my webhotel, and I got the error when people use the contactform, it's on ver. 1.5.4.1.

I found the code in line 148 in /system/library/mail.php, and the line ends with "$this->parameter", I can see that the next line don't have this in the end. But even there is an else, it takes the first line, and sent the error messages on the screen, but still sent the mail.

When moved the , $this->parameter from the end, the problem was solved :) :) - Just for your information :)

Regards

Lars

Newbie

Posts

Joined
Sun Oct 14, 2012 11:33 pm

Post by fauscht » Thu Aug 15, 2013 4:07 am

LarsV wrote:I know this an old tread, but it's still actual, I'm running on one.com as my webhotel, and I got the error when people use the contactform, it's on ver. 1.5.4.1.

I found the code in line 148 in /system/library/mail.php, and the line ends with "$this->parameter", I can see that the next line don't have this in the end. But even there is an else, it takes the first line, and sent the error messages on the screen, but still sent the mail.

When moved the , $this->parameter from the end, the problem was solved :) :) - Just for your information :)

Regards

Lars
Lars, did you experience some difficulties about the confirmation e-mail to the customers after this change?
Cause I also have one.com as webhotel provider and after the change no order email was sent out the customer after the payment was made.

Newbie

Posts

Joined
Thu Aug 15, 2013 4:01 am
Who is online

Users browsing this forum: No registered users and 57 guests