|
|
| Author |
Message |
lhna
New User
Joined: 22 Mar 2010
Posts: 24
|
Posted: June 9th 2010, 8:00 am Post subject: Mail2Forum fails to send mail occasionally? |
|
|
Does anyone have any experience with Mail2Forum? I've posted this question on their forum, but it seems like there's only one other person in their community.
My forum / M2F installation works flawlessly about 95% of the time. However, about 1 out of 20 or so posts fails to generate an outgoing email. Recently, it started getting worse, like maybe 1 out of 3 posts fails to send mail. Here is the message shown in the M2f log when it happens:
| Code:
|
[m2f_handler.php, line 174, dist 8, 1.54s]
Could not send mail: mail() returned failure
Backtrace:
file: 174 - /home1/loringhe/public_html/m2f/m2f_handler.php
call: m2f_log(2, "Could not send mail: mail() returned failure", 174, "/home1/loringhe/public_html/m2f/m2f_handler.php")
|
On the server's PHP error log I see this:
| Code:
|
[27-Apr-2010 20:58:16] PHP Warning: include_once(M2F_ROOT_PATHm2f_common.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /home1/loringhe/public_html/m2f/m2f_handler.php on line 13
[27-Apr-2010 20:58:16] PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening 'M2F_ROOT_PATHm2f_common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home1/loringhe/public_html/m2f/m2f_handler.php on line 13
[27-Apr-2010 20:58:16] PHP Warning: include_once(M2F_ROOT_PATHm2f_forum.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /home1/loringhe/public_html/m2f/m2f_handler.php on line 14
|
I also see this sometimes in the PHP error log:
| Code:
|
[19-May-2010 20:18:43] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/loringhe/public_html/m2f/m2f_common.php:238) in /home1/loringhe/public_html/posting.php on line 602
[19-May-2010 20:18:43] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/loringhe/public_html/m2f/m2f_common.php:238) in /home1/loringhe/public_html/includes/page_header.php on line 485
|
There seems to be no pattern to the failures, it's not associated with any particular member or forum. Any idea what's causing this occasional failure? |
|
| Back to top |
|
 |
Thoul
VIP

Joined: 30 Jul 2002
Posts: 18040
Location: USA
|
Posted: June 10th 2010, 1:31 pm Post subject: |
|
|
Based on that first part of the PHP error log, it seems a constant named M2F_ROOT_PATH is being called on the 13th line of m2f/m2f_handler.php without being defined first. PHP assumes it literally means "M2F_ROOT_PATH," so it's looking for M2F_ROOT_PATHm2f_forum.php instead of the correct location of m2f_forum.php.
I don't know if this will be related to the sending failure problem or not. I can't give you specifics on how to fix this as I don't know the coding of this modification personally. You may need to add something like this somewhere in the PHP code:
| Code:
|
|
define('M2F_ROOT_PATH', './m2f');
|
As for the last block of errors, check for blank spaces at the end of m2f/m2f_common.php. There should be a line with ?> near the end of the file. Make sure nothing at all, not even a space, is after ?>. _________________ Fringes of Algo - Phantasy Star Community
TV Blitz Forums - Television Discussion Community
phpBB Smith: Modifications
70+ Listings @ phpBBHacks.com |
|
| Back to top |
|
 |
lhna
New User
Joined: 22 Mar 2010
Posts: 24
|
Posted: June 11th 2010, 8:15 am Post subject: |
|
|
Ah, that makes sense. Here are the first few lines of the m2f_handler.php:
| Quote:
|
if (isset($_POST['m2f_root_path']) || isset($_GET['m2f_root_path']) || isset($_COOKIE['m2f_root_path'])) die ('Hacking attempt');
include_once (M2F_ROOT_PATH . 'm2f_common.php'); [<---this is line 13]
include_once (M2F_ROOT_PATH . 'm2f_forum.php');
include_once (M2F_ROOT_PATH . 'm2f_mailinglist.php');
include_once (M2F_ROOT_PATH . 'm2f_attachments.php');
include_once (M2F_ROOT_PATH . 'm2f_cron.php');
|
So, would I add the
| Code:
|
|
define('M2F_ROOT_PATH', './m2f');
|
right before line 13, or before that first line, too?
Oh, and I checked the m2f_common.php, and there are no characters or spaces after the ?>
Thanks!
Mike |
|
| Back to top |
|
 |
Thoul
VIP

Joined: 30 Jul 2002
Posts: 18040
Location: USA
|
|
| Back to top |
|
 |
lhna
New User
Joined: 22 Mar 2010
Posts: 24
|
Posted: June 11th 2010, 4:14 pm Post subject: |
|
|
OK, thanks. It seems strange, that without this constant defined, that it would even work at all. Odd that it works most of the time as it is, and just fails occasionally.
Anyway, I'lll try it tomorrow when i get back home and will post back with results.
thanks,
Mike |
|
| Back to top |
|
 |
lhna
New User
Joined: 22 Mar 2010
Posts: 24
|
Posted: June 27th 2010, 8:59 pm Post subject: |
|
|
Well, that seemed to help. Worked great for about 2 weeks, but I just had another failure. This time appeared to be a different type failure.
Here's what the PHP error log showed that day:
| Code:
|
[25-Jun-2010 12:08:53] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/loringhe/public_html/m2f/m2f_common.php:238) in /home1/loringhe/public_html/posting.php on line 602
[25-Jun-2010 12:08:53] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/loringhe/public_html/m2f/m2f_common.php:238) in /home1/loringhe/public_html/includes/page_header.php on line 485
[25-Jun-2010 12:08:53] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/loringhe/public_html/m2f/m2f_common.php:238) in /home1/loringhe/public_html/includes/page_header.php on line 487
[25-Jun-2010 12:08:53] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/loringhe/public_html/m2f/m2f_common.php:238) in /home1/loringhe/public_html/includes/page_header.php on line 488
|
I don't know if this is related, but I get TONS of these errors every day on the Main error log:
| Code:
|
[Sun Jun 27 20:47:00 2010] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Sun Jun 27 20:47:00 2010] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Sun Jun 27 20:47:00 2010] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Sun Jun 27 20:47:00 2010] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Sun Jun 27 20:47:03 2010] [error] [client 66.249.71.44] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sun Jun 27 20:47:03 2010] [error] [client 66.249.71.44] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
|
Can anyone make heads or tails of any of that?
thanks,
Mike |
|
| Back to top |
|
 |
lhna
New User
Joined: 22 Mar 2010
Posts: 24
|
Posted: July 17th 2010, 8:04 pm Post subject: |
|
|
Any further suggestions on this? I'm still getting send failures.
thanks,
Mike |
|
| Back to top |
|
 |
lhna
New User
Joined: 22 Mar 2010
Posts: 24
|
|
| Back to top |
|
 |
lhna
New User
Joined: 22 Mar 2010
Posts: 24
|
Posted: November 20th 2010, 9:41 am Post subject: |
|
|
Well, I think we've found the problem. I don't know why I didn't think about this before, but it was a simple matter of us exceeding the maximum number of hourly emails allowed by our host. (The host finally figured it out and told us.) They've increased the limit to their max, but it's still not enough when the board gets busy. Time to find another host!
Anyway, thanks for everyone's help. |
|
| Back to top |
|
 |
Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.
|
|
| Back to top |
|
 |
|