Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9
Author Message
Linea
New Member
New Member



Joined: Aug 15, 2003
Posts: 11

PostPosted: Sat Aug 23, 2003 6:30 pm Reply with quote

After I installed your download package as an upgrade I had an email problem popup. The phpbb board stopped sending emails. Well I managed to track down the problem today. It's in the emailer.php file and is as follows:

somebody buy me pizza and donuts ... after all day ... I've found the <bleep> problem. there were two unitialized variables. Mind you I don't actually KNOW php so maybe they were supposed to get values somehow. And I'm certain there is a prettier solution .. but here's the code. I inserted the code commented by //<CJM> ... //</CJM>

Somewhere near line 238 (my line numbers may not be accurate)
Code:


 while (list($type, $address_ary) = each($this->addresses))
                {
                        @reset($address_ary);
                        while (list(, $which_ary) = each($address_ary))
                        {
                                $$type .= (($$type != '') ? ',' : '') . (($which_ary['name'] != '') ? '"' . $this->encode($which_ary['name']) . '" <' . $which_ary['email'] . '>' : '<' . $which_ary['email'] . '>');
                        }
                }

                //<CJM>   $bcc and $cc are not defined at this point in time.
                $bcc=$cc="";
                $cci=0;
                while($cct = $this->addresses['cc'][$cci++]) {
                      if ($cci>1)  { $cc .= "," . $cct;}
                      else { $cc=$cct; }
                      }
                $cci=0;
                while($cct = $this->addresses['bcc'][$cci++]) {
                      if ($cci>1)  { $bcc = $bcc . "," . $cct;}
                      else { $bcc=$cct; }
                      }
                //<CJM>   $bcc and $cc are not defined at this point in time.


                // Build header
                $this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . trim($this->extra_headers) . (($cc != '') ? "Cc:$cc\n" : '')  . (($bcc != '') ? "Bcc:$bcc\n" : '');

 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Aug 23, 2003 11:47 pm Reply with quote

I haven't had this issue, nor has anyone else reported it. ChatServe is the phpbb Guru. I have contacted him and asked him to take a look at this. Someone will get back with you.
 
View user's profile Send private message
Linea







PostPosted: Mon Aug 25, 2003 11:33 am Reply with quote

Oh, how I wish I had checked this before....
It seems the include file versions are different.
The emailer.php in the package I downloaded from you is
Quote:
<?php
/***************************************************************************
emailer.php
-------------------
begin : Sunday Aug. 12, 2001
copyright : (C) 2001 The phpBB Group
email : support@phpbb.com

$Id: emailer.php,v 1.15.2.29 2003/06/15 12:08:20 acydburn Exp $

***************************************************************************/

The emailer.php from the full download from phpbb.com is
Quote:
<?php
/***************************************************************************
emailer.php
-------------------
begin : Sunday Aug. 12, 2001
copyright : (C) 2001 The phpBB Group
email : support@phpbb.com

$Id: emailer.php,v 1.15.2.33 2003/07/18 16:34:01 acydburn Exp $

***************************************************************************

and it contains a much more elegant fix written in php style.
Code:
      $to = $this->addresses['to'];


      $cc = (count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : '';
      $bcc = (count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : '';
 
Raven







PostPosted: Mon Aug 25, 2003 11:37 am Reply with quote

Well that is interesting. The upgrade package I include is from NukeCops. I doubt if they know it has changed. It is interesting also that I have not heard from anyone else. I will, of course, upgrade the package. When was it causing the problem? On responses to posts, PM's, or what?
 
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Mon Aug 25, 2003 12:09 pm Reply with quote

Interesting indeed, i'll check on it right now and post back.
 
View user's profile Send private message Visit poster's website
Linea







PostPosted: Mon Aug 25, 2003 12:19 pm Reply with quote

it only showed up messages with bcc's and cc's. the TO field is set correctly earlier in the script. it only affected the bcc and cc.

I haven't diffed the file versions, but i did notice there seemed to be other changes as well (line numbers didn't match even close, of course I hacked my copy all to peices in finding the problem *shrug*). And I'd suspect that there are actually 3 files that have changed. In general it seems emailer.php, smtp.php, and functions_post.php come as a set. I haven't actually checked the file dates, versions or diffs, but while you're checking you should check all three.

I should also warn you, in reading posts on phpbb.com there seemed to be a significant amount of complaints regarding email ..... it may infact be that it may be best to keep the current file versions. I honestly don't know.


Lin
 
Raven







PostPosted: Mon Aug 25, 2003 2:11 pm Reply with quote

CS has also been looking into the fact that I am unable to get PM's to send email. Everything else works, but not PM notification. The fact that I get forum post response notification and not PM's is as frustrating as can be!
 
chatserv







PostPosted: Mon Aug 25, 2003 2:22 pm Reply with quote

I guess this suggests re-porting the entire forums which i will, for now i did just that with the "changed files only" package, try the emailer.php file and let me know how it goes:

XXXXXXXXXXXXXXXXXXXXXXXX

Edit: get the actual includes folder instead:
http://www.nukefixes.com/files/includes.zip
 
Raven







PostPosted: Mon Aug 25, 2003 3:03 pm Reply with quote

Just got home. I'll try this tonight and let you know. Thanks CS!
 
Raven







PostPosted: Mon Aug 25, 2003 5:54 pm Reply with quote

Testing new code in Post Reply. Chat and/or Linea, did you get this?
 
Linea







PostPosted: Mon Aug 25, 2003 6:08 pm Reply with quote

uh ? got what ? Confused

I've been gone all afternoon, I'm clueless.

I did get a notification ealier this morning.
 
Raven







PostPosted: Mon Aug 25, 2003 6:09 pm Reply with quote

Well the PM test didn't work. CS, since the includes files were updated, what about the modules and admin files that were in your other upgrade?
 
Raven







PostPosted: Mon Aug 25, 2003 6:10 pm Reply with quote

CS, here'sthe bouncback I get

The original message was received at Mon, 25 Aug 2003 19:08:58 -0500
from nobody@localhost

----- The following addresses had permanent fatal errors -----
Undisclosed-recipients:;

----- Transcript of session follows -----
553 5.1.3 Undisclosed-recipients:;... List:; syntax illegal for recipient addresses
 
chatserv







PostPosted: Mon Aug 25, 2003 10:29 pm Reply with quote

I also ported the rest of the files that come with the changed files pack but to be honest i don't think any will make a change, after having followed posts at phpbb.com's support forum just like Linea it's quite obvious there are issues for many people with emails sent by the forums, i've yet to find one similar to yours Raven but who knows, maybe what cause the other problem is to blame for yours, wish i knew why it only affects some and not all, will keep an eye on their board in case they come up with a solution or at least the reason in case i can't find it myself.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©