Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 03:55 pm EST
Geeklog Forums
Geeklog running on Sourceforge.net
Auspexian
Anonymous
Anyone successfully able to run Geeklog on their home page on sourceforge.net?
I have two projects, I installed geeklog on both, neither will allow login, cookies issue.
The exact sites can be run perfectly on my Linux Redhat system.
Tks
John
I have two projects, I installed geeklog on both, neither will allow login, cookies issue.
The exact sites can be run perfectly on my Linux Redhat system.
Tks
John
12
9
Quote
auspexian
Anonymous
Thanks Dirk, I'll continue to debug :-)
8
12
Quote
Status: offline
thelusiv
Forum User
Junior
Registered: 05/21/04
Posts: 23
Location:Clemson, SC
I'm setting up a Geeklog site on SourceForge and was wondering how you guys went about dealing with this:
Do you have any useful scripts, tips, or anything else I should know that might help me set this up?
Quote by sourceforge docs:The ability to send email from the project web servers has been stopped to curb past abuse that has occurred from the project web servers. However, we do realize that this is a valued and required feature for many projects hosted on SourceForge.net, so we have provided a method for a project to accomplish this task. At a high level, it would look like this:
The module of the project web service that requires the ability to send out mail would now be modified to queue the message to the project database.
A cron job would be configured to pull out and send the emails from the project shell server.
The module of the project web service that requires the ability to send out mail would now be modified to queue the message to the project database.
A cron job would be configured to pull out and send the emails from the project shell server.
Do you have any useful scripts, tips, or anything else I should know that might help me set this up?
11
14
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by thelusiv: Do you have any useful scripts, tips, or anything else I should know that might help me set this up?
How about using an SMTP server? That would be the easiest solution.
You can also write your own function to send email (in lib-custom.php, a sample function is included).
bye, Dirk
13
16
Quote
Status: offline
thelusiv
Forum User
Junior
Registered: 05/21/04
Posts: 23
Location:Clemson, SC
Quote by Dirk:How about using an SMTP server? That would be the easiest solution.
I will try this. However, I thought I read in the Sourceforge docs about not being able to make outbound connections. Maybe I misunderstood something...
16
13
Quote
Status: offline
thelusiv
Forum User
Junior
Registered: 05/21/04
Posts: 23
Location:Clemson, SC
I tried using an SMTP server but either SF.net is totally blocking outbound connections or my ISP doesn't allow me to use their SMTP server outside their network (even with authentication). So has no one ever done this DB mail cache and cron sending thing? I will take a crack at it tonight and see if I can set it up...
14
17
Quote
Status: offline
thelusiv
Forum User
Junior
Registered: 05/21/04
Posts: 23
Location:Clemson, SC
It wasn't terribly hard to implement. I changed CUSTOM_mail to call my own mail function which inserted the mail data into a table in the database called gl_mailpool. The table has a field for an id number (mid), fields for subject, recipients, headers, body, and a flag to tell if this particular mail's been sent or not. I used this shell script as an hourly cron job to send the mail:
<?php
include_once("../htdocs/lib-common.php");
$num_emails = DB_count("gl_mailpool","sent","0");
$result = DB_query("SELECT mid,recipients,subject,body,headers FROM gl_mailpool WHERE sent='0'");
for( $i = 0; $i < $num_emails; $i++ )
{
$A = DB_fetchArray($result);
system("echo \"{$A['body']}\" > tmpmailfile");
system("mail -s \"{$A['subject']}\" {$A['recipients']} < tmpmailfile");
echo "sent mail to: {$A['recipients']}\nsubject: {$A['subject']}\n";
DB_query("UPDATE gl_mailpool SET sent='1' WHERE mid={$A['mid']}");
}
?>
So, as the mails are sent it flags them as sent in the database so they don't get sent more than once, and the output of the script is the recipients and subjects which I receive as output of the cron job. The mail program is about the only way SF provides to send mail and it doesn't really let me do anything to the headers but I don't think that's a big deal.
If anyone sees any obvious mistakes in this script or has a better way to do it I'm all ears.
Text Formatted Code
#!/usr/bin/php -q<?php
include_once("../htdocs/lib-common.php");
$num_emails = DB_count("gl_mailpool","sent","0");
$result = DB_query("SELECT mid,recipients,subject,body,headers FROM gl_mailpool WHERE sent='0'");
for( $i = 0; $i < $num_emails; $i++ )
{
$A = DB_fetchArray($result);
system("echo \"{$A['body']}\" > tmpmailfile");
system("mail -s \"{$A['subject']}\" {$A['recipients']} < tmpmailfile");
echo "sent mail to: {$A['recipients']}\nsubject: {$A['subject']}\n";
DB_query("UPDATE gl_mailpool SET sent='1' WHERE mid={$A['mid']}");
}
?>
So, as the mails are sent it flags them as sent in the database so they don't get sent more than once, and the output of the script is the recipients and subjects which I receive as output of the cron job. The mail program is about the only way SF provides to send mail and it doesn't really let me do anything to the headers but I don't think that's a big deal.
If anyone sees any obvious mistakes in this script or has a better way to do it I'm all ears.
15
15
Quote
BlackDex
Anonymous
So if im correct,
With this script ppl should be able to send mail through the sourceforge web-account???
With this script ppl should be able to send mail through the sourceforge web-account???
11
14
Quote
All times are EST. The time is now 03:55 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content