Email Digests

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
48
59%
Very Good
17
21%
Good
9
11%
Fair
2
2%
Poor
6
7%
 
Total votes: 82

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Sun Apr 11, 2004 2:15 pm

I left a message on the Mod Authors Support Forum about procedures, if any, for transferring mod authorship. I can post there now as an official mod author!

The solution to the cron problem recommended by weeguy is one that I think could be added to the knowledge base. Perhaps the information could be put in batch_scheduling.txt. I don't know if these services try repeatedly if there is a disconnect. One way around the potential security problem would to pass a URL authentication parameter and check for it, something like...

mail_digests.php&auth=123

Of course the mail_digests.php would have to check for this parameter and have to know the auth code. These could be hidden in digest_constants.php and enabled/disabled via a toggle in that same file. I agree it would make for a simpler install ... a lot of people find the cron thing frustrating.

Indemnity_83, it's really up to you as to how fast you want to take this and what features you want to add and when. I would actively solicit feedback from digest users. You can't always please everyone due to the architecture of the application, but 80% of the way there is often all that is needed.

dmolavi
Registered User
Posts: 29
Joined: Fri Feb 20, 2004 7:45 pm
Location: Washington Township, NJ, USA
Contact:

Post by dmolavi » Sun Apr 11, 2004 8:29 pm

getting the following errors when running via crontab:

Code: Select all

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2/mail_digests.php on line 35

Warning: main(): Failed opening './extension.inc' for inclusion (include_path='.:/usr/lib/php') in /home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2/mail_digests.php on line 35

Warning: main(./common.): failed to open stream: No such file or directory in /home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2/mail_digests.php on line 36

Warning: main(): Failed opening './common.' for inclusion (include_path='.:/usr/lib/php') in /<path deleted>/phpBB2/mail_digests.php on line 36

Warning: main(./includes/digest_emailer.): failed to open stream: No such file or directory in /<path deleted>/phpBB2/mail_digests.php on line 37

Warning: main(): Failed opening './includes/digest_emailer.' for inclusion (include_path='.:/usr/lib/php') in /<path deleted>/phpBB2/mail_digests.php on line 37

Warning: main(./includes/digest_constants.): failed to open stream: No such file or directory in /<path deleted>/phpBB2/mail_digests.php on line 38

Warning: main(): Failed opening './includes/digest_constants.' for inclusion (include_path='.:/usr/lib/php') in /<path deleted>/phpBB2/mail_digests.php on line 38

Fatal error: Call to a member function on a non-object in /<path deleted>/phpBB2/mail_digests.php on line 59
however if

Code: Select all

php mail_digests.php
is executed via command line in the phpBB2 directory, it exits successfully....any ideas?

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Sun Apr 11, 2004 8:39 pm

It would be helpful to see your command line. The most obvious thing to check is whether the absolute path to PHP is correct.

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Sun Apr 11, 2004 11:32 pm

dmolavi wrote: getting the following errors when running via crontab:

Code: Select all

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2/mail_digests.php on line 35

Warning: main(): Failed opening './extension.inc' for inclusion (include_path='.:/usr/lib/php') in /home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2/mail_digests.php on line 35

Warning: main(./common.): failed to open stream: No such file or directory in /home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2/mail_digests.php on line 36

Warning: main(): Failed opening './common.' for inclusion (include_path='.:/usr/lib/php') in /<path deleted>/phpBB2/mail_digests.php on line 36

Warning: main(./includes/digest_emailer.): failed to open stream: No such file or directory in /<path deleted>/phpBB2/mail_digests.php on line 37

Warning: main(): Failed opening './includes/digest_emailer.' for inclusion (include_path='.:/usr/lib/php') in /<path deleted>/phpBB2/mail_digests.php on line 37

Warning: main(./includes/digest_constants.): failed to open stream: No such file or directory in /<path deleted>/phpBB2/mail_digests.php on line 38

Warning: main(): Failed opening './includes/digest_constants.' for inclusion (include_path='.:/usr/lib/php') in /<path deleted>/phpBB2/mail_digests.php on line 38

Fatal error: Call to a member function on a non-object in /<path deleted>/phpBB2/mail_digests.php on line 59
however if

Code: Select all

php mail_digests.php
is executed via command line in the phpBB2 directory, it exits successfully....any ideas?


You know, I've been getting stuff like this lately. I haven't been getting my digest for a while and I figured it was my ISP blocking it as spam. I have the digest set up on another domain of mine and it's been coming through fine.

Only today did I discover something in my server's environment had changed. I still don't know what it is but I was getting messages similar to yours:

Code: Select all

Warning: main(../extension.inc): failed to open stream: No such file or directory in /home2/mhamill/potomactavern-www/protected_scripts/mail_digests.php on line 35

Warning: main(): Failed opening '../extension.inc' for inclusion (include_path='./:/usr/local/lib/php') in /home2/mhamill/potomactavern-www/protected_scripts/mail_digests.php on line 35
Anyhow, I tried a number of different ways to solve the problem. Since I have mail_digests.php in a protected directory requiring HTTP authentication to access via URL, I hardcoded an absolute path in mail_digests.php to my phpBB root directory by changing line 34 from

Code: Select all

$phpbb_root_path = '../'; 
to

Code: Select all

$phpbb_root_path = '/home2/mhamill/potomactavern-www/'; 
And it worked.

In your case though I'm betting your path is mixed up. Go in with telnet or SSH until your in the directory containing phpBB. Then do a pwd command. I bet it's not:

Code: Select all

/home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Mon Apr 12, 2004 1:13 am

On switching mod authors, see this:

http://www.phpbb.com/phpBB/viewtopic.ph ... 18#1043618

dmolavi
Registered User
Posts: 29
Joined: Fri Feb 20, 2004 7:45 pm
Location: Washington Township, NJ, USA
Contact:

Post by dmolavi » Mon Apr 12, 2004 12:39 pm

i know my servers like i know the back of my hand :)

Code: Select all

<user_deleted>: /home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2 # pwd
/home/httpd/phpnuke.nukedgallery.net/htdocs/phpBB2
hardcoding the path fixed the error.

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Mon Apr 12, 2004 1:30 pm

This is a tip to add to the knowledge base then.

But I don't understand why a relative path won't work for some crontabs. I think it has something to do with the UNIX environmental variables set for the crontab.

All I know is it worked fine for months then stopped working for me.

User avatar
snkhan
Registered User
Posts: 110
Joined: Sun Aug 03, 2003 6:34 pm
Location: United Kingdom
Contact:

Post by snkhan » Tue Apr 13, 2004 3:32 am

Hi zocalo,

Thanks for the help with the CSS issue, the digest it working beautifully now with my CRON.

Just one more favour - can you please pass me your tpl file for the HTML version? The current version I am receiving is looking slightly cramped, and your version seems more spaced out. I've tried looking in the HTML.TPL file but cant see what needs modifying. I am assuming that one of the .php files needs updating too?

I'm also trying to make the font smaller in the actual digest email, to around 10px. However, I don't know which css attribute to change. I've tried changing a few of them to 10px, but there doesn't appear to be a visual change. So the text inside the tables needs to be the same size as the heading on the tables.

@Mark
Yes I too have had to hard code some of the values in. But it was fairly easy thanks to the generous help from people in the forum :-)

saj
snkhan.co.uk

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Tue Apr 13, 2004 4:44 am

snkhan wrote: Hi zocalo,

Thanks for the help with the CSS issue, the digest it working beautifully now with my CRON.

Just one more favour - can you please pass me your tpl file for the HTML version? The current version I am receiving is looking slightly cramped, and your version seems more spaced out. I've tried looking in the HTML.TPL file but cant see what needs modifying. I am assuming that one of the .php files needs updating too?

I'm also trying to make the font smaller in the actual digest email, to around 10px. However, I don't know which css attribute to change. I've tried changing a few of them to 10px, but there doesn't appear to be a visual change. So the text inside the tables needs to be the same size as the heading on the tables.

@Mark
Yes I too have had to hard code some of the values in. But it was fairly easy thanks to the generous help from people in the forum :-)

saj


snakhan, this is my new account name, sorry to be confusing people, but otherwise everybody outside of phpBB would be confused :P. Anyway, on to addressing your questions

I'm still working on polishing the code for the new email tempate. Its still missing a rather large piece, it doesn't list the forum. In my situation it didn't matter, but it should be there for those users who do want it.

However, since there seems to be a few people chomping at the bit for it I'll post a copy on my own board (I still need to talk to a Moderator about the rules for posting updated version in here) for those early adopters who are really anxious to get their hands on it. Currently its only been though a small amount of testing, and the subSilver template is hard coded into it. So needless to say it a use at your own risk, you probably shouldn't put this on a production board unless you know what your doing. At least save a backup of the mail_digests.php and template file somewhere in case I have an error.

You can find the new code here: http://dormlife.us/viewtopic.php?t=9
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

agiacosa
Registered User
Posts: 186
Joined: Mon Jan 19, 2004 1:45 pm

Post by agiacosa » Tue Apr 13, 2004 11:02 am

Folks,

Thanks for bringing this back to life.

I have a forum that competes against 3 other forums. I think the email digest will go a long way in increasing traffic in my forum. So I'm very excited about trying it.

Unfortunately, I am still new to coding and am still on a shared server. I'm using subSilver as my theme so I'm hoping the current hard coding listed above will work for me, as well as, the solution to the cron problem.

Has it been tried on version 2.0.8a?

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Tue Apr 13, 2004 12:00 pm

It works fine for me in 2.0.8a and I put that in the notes of the published version.

However, there is always the possibility of a mod conflict. Too many mods may mean that one mod interferes with each other, and in those cases you have to go in and muck with the code to make it work.

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Tue Apr 13, 2004 3:27 pm

agiacosa wrote: ... Has it been tried on version 2.0.8a?


I am using it on my Dormlife board, which is 2.0.8a and it works fine. I would expect it will work thoughout the rest of the 2.0.x series, as the dev team said they wouldn't be making any new changes to 2.0.x except to fix security issues.
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Tue Apr 13, 2004 5:10 pm

Zocalo/Indemnity_83,

In the next version I would suggest that you make a recommendation to hard code the absolute server path to the phpBB directory in mail_digests.php when mail_digests.php is run from a crontab or similar scheduling system based on the server. It worked with me using relative paths for a long time then stopped. The absolute path should be failsafe. batch_scheduling.txt would need to be updated.

As an example of what worked for me I changed line 34 to be:

Code: Select all

$phpbb_root_path = '/home2/mhamill/potomactavern-www/'; 

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Tue Apr 13, 2004 5:28 pm

Mark,

Just so I can try to think about what causes this, do you have your mail_digest.php file somewhere other than the phpBB root path?
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

User avatar
MarkDHamill
Registered User
Posts: 3942
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Tue Apr 13, 2004 5:54 pm

Yes, I have it in a folder under my phpBB root directory called protected_scripts.

But that shouldn't make a difference because changing the line to use ../ (parent directory) stopped working but the absolute path worked.

Post Reply

Return to “[2.0.x] MOD Database Releases”