Firefox PHP

Module: Group Auto-Email

Posted by Joe Curia 
Re: Module: Group Auto-Email
July 03, 2008 08:41AM
Quote
Azumandias
Quote
itasor
I have been running this mod for months (Version 2.01) and all of a sudden e-mails have stopped being sent out. No changes were made to anything. Is this most likely a PHP problem on the server end?

Thanks!

It would seem to be a server error yes. Do you see any errors in the Event Logging module? In the server logs?

I didn't have Event Logging turned on, so I turned it on and then posted a message that should have generated an e-mail. I got a bunch of PHP errors in the log. This same error appeared numerous times, so I will only post it once:

(I put the stars in)

PHP notice: Undefined index: phorum_mod_group_autoemail

PHP notice generated at /home/********/domains/********.org/public_html/mods/group_autoemail/group_autoemail.php:138

Back trace:

Function phorum_mod_group_autoemail_after_post called
----
Function call_user_func_array called at
{path to Phorum}/common.php:991
----
Function phorum_hook called at
{path to Phorum}/include/posting/action_post.php:226
----
Function include called at
{path to Phorum}/posting.php:470
----

Request info:

HTTP_HOST = uaugtalk.org
HTTP_REFERER = [********.org]
REQUEST_URI = /posting.php

The other errors are the same exact thing, except the top part (before Back Trace) says:

PHP notice: Undefined index: phorum_mod_group_autoemail_user_unsubscribe_setting

PHP notice generated at /home/uaugtalk/domains/uaugtalk.org/public_html/mods/group_autoemail/group_autoemail.php:85

and


PHP notice: Undefined variable: headers

PHP notice generated at /home/uaugtalk/domains/uaugtalk.org/public_html/mods/group_autoemail/group_autoemail.php:128


Thanks!



Edited 4 time(s). Last edit at 07/03/2008 08:47AM by itasor.
Re: Module: Group Auto-Email
July 03, 2008 10:01AM
Thanks for the quick reply with detailed error logs. It looks to me as if you are the victim of two circumstances out of your control. First, your provider either upgraded their PHP version or made it a little more strict (ie requiring cleaner code) and second I had an error in the code which was overlooked by my provider but hung you up. At least so I hope. Please download the latest version and you should be good to go.

I have upgraded this mod to version 5.2.1.03 with these changes:

- Added the option to send emails to users in a group which does not have read permisions in the relevant forum.

- Fixed a bug which could cause the emails to appear invalid.

- Fixed a bug which caused a display error in the Control Center page.

- Fixed a bug which caused problems for other tpl_cc_usersettings mods.

- Cleared a number of php errors.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald




Edited 1 time(s). Last edit at 07/03/2008 10:04AM by Azumandias.
Re: Module: Group Auto-Email
July 03, 2008 01:15PM
Wow, thank you for the quick reply and fix! Before I install it, is there anything special I need to do besides copying it over to the mods folder?

Is the e-mail template the same? I have customized my english.php lang file for this mod. Can I keep my current one (will it work?)

Thanks!!
Re: Module: Group Auto-Email
July 03, 2008 01:19PM
Quote
itasor
Wow, thank you for the quick reply and fix! Before I install it, is there anything special I need to do besides copying it over to the mods folder?

Is the e-mail template the same? I have customized my english.php lang file for this mod. Can I keep my current one (will it work?)

Make sure to keep a copy of your english.php or delete the lang folder from the install before you copy it up so that it doesn't overwrite your file. You will probably want to double check the settings after copying the new mod up, but otherwise there shouldn't be any problems.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Group Auto-Email
July 03, 2008 01:34PM
Quote
Azumandias
Quote
itasor
Wow, thank you for the quick reply and fix! Before I install it, is there anything special I need to do besides copying it over to the mods folder?

Is the e-mail template the same? I have customized my english.php lang file for this mod. Can I keep my current one (will it work?)

Make sure to keep a copy of your english.php or delete the lang folder from the install before you copy it up so that it doesn't overwrite your file. You will probably want to double check the settings after copying the new mod up, but otherwise there shouldn't be any problems.

Ok, I installed the new version and I'm still getting errors and no e-mail sent. Now, I only get 1 error in the log:


PHP notice: Undefined index: permissions

PHP notice generated at /home/uaugtalk/domains/uaugtalk.org/public_html/mods/group_autoemail/group_autoemail.php:86

Back trace:

Function phorum_mod_group_autoemail_after_post called

If I should make a new thread for this issue, let me know. I don't want to clutter this one up if the problem is on my end!

EDIT: I contacted the admin for my server. He said that PHP has not been upgraded in the past few weeks, and that php.ini has not been touched on the machine.



Edited 1 time(s). Last edit at 07/03/2008 01:45PM by itasor.
Re: Module: Group Auto-Email
July 03, 2008 02:17PM
Quote
itasor
Ok, I installed the new version and I'm still getting errors and no e-mail sent. Now, I only get 1 error in the log:


PHP notice: Undefined index: permissions

PHP notice generated at /home/uaugtalk/domains/uaugtalk.org/public_html/mods/group_autoemail/group_autoemail.php:86

Back trace:

Function phorum_mod_group_autoemail_after_post called

If I should make a new thread for this issue, let me know. I don't want to clutter this one up if the problem is on my end!

EDIT: I contacted the admin for my server. He said that PHP has not been upgraded in the past few weeks, and that php.ini has not been touched on the machine.

Hmm, there should definitely be permissions from my understanding of the phorum code. Please check to make sure the users are in a group with your forums assigned to that group. Why this would change all of a sudden like I'm not sure. Especially if there were not changes on the server side.

Don't worry about cluttering this thread, solving problems with the mod is the main purpose of the thread.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Group Auto-Email
July 03, 2008 04:03PM
Quote
Azumandias
Hmm, there should definitely be permissions from my understanding of the phorum code. Please check to make sure the users are in a group with your forums assigned to that group. Why this would change all of a sudden like I'm not sure. Especially if there were not changes on the server side.

Don't worry about cluttering this thread, solving problems with the mod is the main purpose of the thread.

I double checked the group. I see the group "Board Members" under the groups page in the admin panel. I checked a few users, including myself and my test account. The users are "Approved" members of the group.

Someone posted in the area that sends out e-mails on Tuesday night and when I checked my mail Wednesday morning, I had received their messages sent by this mod. I immediately replied to them and that's when I didn't get the e-mails. I have posted numerous times to test and haven't gotten those either. That's why I was so surprised it stopped working. I checked again with the server administrator and he verified that nothing was changed during those times and he provided with with the dates that things were modified, none of which were anywhere near or after the time that e-mails stopped sending.

I just wanted to say that I really appreciate all the help and the service you guys provide to people using your products!
Re: Module: Group Auto-Email
July 03, 2008 04:21PM
Unfortunately the quick responses will stop for the next couple of days as I will be out of town. However, a couple of last things to check before I can dedicate some time to debugging:

Has anything changed with your anti-spam? Do other users get the emails?

For testing purposes, please uncheck both
"Only send emails to groups with permission to read the relevant forum:"
and
"Allow users to choose to stop receiving group emails (set in the Control Center):"
one at a time to determine if either of those is stopping the emails.

Beyond that I will need to supply you with some debugging code, but that won't happen until Friday night/Saturday at the earliest, sorry.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Group Auto-Email
July 03, 2008 06:21PM
Quote
Azumandias
Unfortunately the quick responses will stop for the next couple of days as I will be out of town. However, a couple of last things to check before I can dedicate some time to debugging:

Has anything changed with your anti-spam? Do other users get the emails?

For testing purposes, please uncheck both
"Only send emails to groups with permission to read the relevant forum:"
and
"Allow users to choose to stop receiving group emails (set in the Control Center):"
one at a time to determine if either of those is stopping the emails.

Beyond that I will need to supply you with some debugging code, but that won't happen until Friday night/Saturday at the earliest, sorry.

Nothing has changed with anti-spam. I have e-mailed a few other members and none of them have received any e-mails from me posting test messages. I created a new test user, added them to my group, and they did not receive an e-mail after a post either.

I checked/unchecked, and tried all combinations of those settings. Nothing made a difference.

I sent a couple of the errors to the server admin so that he can look into the PHP side of things and see if that helps.

Thanks again!
Re: Module: Group Auto-Email
July 04, 2008 07:52AM
itasor,

I have coded a quick debugger which will send various parts of the emailed message to the Event Logging module as well. Please unzip and install the attached group_autoemail.php over your current one (rename the regular one or reupload later). When you send a test message you should see the following events in the log (from bottom up):

- Message "SUBJECT" has been posted by USER

- PHP notice: Array to string conversion (repeated a number of times)

- First user: USERINFO
(This will show us that the user info is being properly generated. Check for the email address here.)

- Boundary: BOUNDARY
(This splits the email source code into parts for the email servers/clients)

- Headers: HEADERS
(This is all the code the email servers/clients use to properly sort/display an email)

- Email message: MESSAGE
(This is the full email message area separated by the boundary lines.)

Please copy up this information (with personal info ***ed out) This will hopefully show us where the code is going wrong.

Could you also have your system admin check the email logs as to whether anything is going out?

EDIT: attached file removed as it is superceded by a later debugger.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald




Edited 1 time(s). Last edit at 07/04/2008 10:53PM by Azumandias.
Sorry, only registered users may post in this forum.

Click here to login