phpBBHacks.com - Mail2Forum fails to send mail occasionally?
Community management insight at ManagingCommunities.com
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Support
 See a User Guidelines violation? Please contact us.
Author Message

lhna
New User

Joined: 22 Mar 2010
Posts: 24

PostPosted: June 9th 2010, 8:00 am    Post subject: Mail2Forum fails to send mail occasionally? Reply with quote

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
View user's profile Send private message

Thoul
VIP

Joined: 30 Jul 2002
Posts: 18040
Location: USA

PostPosted: June 10th 2010, 1:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website

lhna
New User

Joined: 22 Mar 2010
Posts: 24

PostPosted: June 11th 2010, 8:15 am    Post subject: Reply with quote

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
View user's profile Send private message

Thoul
VIP

Joined: 30 Jul 2002
Posts: 18040
Location: USA

PostPosted: June 11th 2010, 9:15 am    Post subject: Reply with quote

Yeah, the define should be fine right before line 13. I'm certain if './m2f' is the right path for it to use, so you might have to adjust that.
_________________
Fringes of Algo - Phantasy Star Community
TV Blitz Forums - Television Discussion Community
phpBB Smith: Modifications

70+ Listings @ phpBBHacks.com
Back to top
View user's profile Send private message Visit poster's website

lhna
New User

Joined: 22 Mar 2010
Posts: 24

PostPosted: June 11th 2010, 4:14 pm    Post subject: Reply with quote

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
View user's profile Send private message

lhna
New User

Joined: 22 Mar 2010
Posts: 24

PostPosted: June 27th 2010, 8:59 pm    Post subject: Reply with quote

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
View user's profile Send private message

lhna
New User

Joined: 22 Mar 2010
Posts: 24

PostPosted: July 17th 2010, 8:04 pm    Post subject: Reply with quote

Any further suggestions on this? I'm still getting send failures.

thanks,
Mike
Back to top
View user's profile Send private message

lhna
New User

Joined: 22 Mar 2010
Posts: 24

PostPosted: October 13th 2010, 8:50 am    Post subject: Requesting bids for help Reply with quote

Since I'm stumped, I'm willing to pay to fix it. I'm requesting bids here:
http://www.vworker.com/RentACoder/misc/BidRequests/ShowBidRequest.asp?lngBidRequestId=1516413
Back to top
View user's profile Send private message

lhna
New User

Joined: 22 Mar 2010
Posts: 24

PostPosted: November 20th 2010, 9:41 am    Post subject: Reply with quote

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
View user's profile Send private message

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: November 20th 2010, 3:49 pm    Post subject: Reply with quote

Thanks for the update, ihna. I appreciate you letting us know and am glad that you got it sorted!

Thanks,

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Support All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.