problems with maillist.php (mailing list 2 forum) [message #16866] |
Wed, 25 February 2004 00:36 |
oblomov
Messages: 12 Registered: February 2004
Karma: 0
|
Junior Member |
|
|
Hi,
I'm trying to set up a (FUD)Forum as an archive for my mailing list but having some problems (should specify that I'm using fudforum that comes with egroupware but this shoudn't be a problem).
1) The admin panel is giving me the execute:
<mydir>/<writable_dir>/<crc(mydomain)>/scripts/maillist.php 1
but there was no scripts directory there (!)
ok, non problem, I cerated manually the scripts directory and installed maillist.php there but
2) mail kept bouncing back with php stderr saying it couldn't find file GLOBALS.php (included in maillist.php with a require)
ok, fine, I copied there GLOBALS.php but
3) I was getting a lot of "permission denied" for other requires in maillist (and/or GLOBALS.php) code: the fact is that <mydir>/<writable_dir>/<crc(mydomain)>/include directory and all installed files are installed with http user as owner and 0700 permission but when setting up a pipe/alias (<address>: |"/<pathtomaillist>/maillist.php <forum_id>" the script is usually not executed as the web server user so all other requires could not be read
so, using fudforum file manager a changed all permissions of included files to be read-all (0744) but
4) I was still getting an error because script could not write to log file in subdir errors so I changed errors/.mlist permissions to be 0777
now I'm just getting this error in the error file log:
(<myhome>/write_directory/fudforum/2945491008/include/theme/default/db.inc:106 <br />
<myhome>/write_directory/fudforum/2945491008/include/theme/default/db.inc:176 <br />
<myhome>/write_directory/fudforum/2945491008/scripts/maillist.php:366<br />
) : <br />
Query: SELECT * FROM phpgw_fud_mlist WHERE id=1<br />
Server Version: <br />
actually the reported query executes fine when done "by hand" in the sql server, I'm stuck again and this time really don't know how to proceed....
If anybody incurred in my same problems I'll be grateful for any help
Thanks
|
|
|
Re: problems with maillist.php (mailing list 2 forum) [message #16868 is a reply to message #16866] |
Wed, 25 February 2004 01:06 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Never tried using NNTP or Mailing List import functionality with eGW, hence the problems you are having :/
Before we proceed one thing to keep in mind, you should disable user creation, since in eGW schema FUDforum does not have the ability to autonomously create users like the standalone version can.
Now on with the show
1) GLOBALS.php should be a symlink not a copy of the GLOBALS.php inside the appropriate fudforum/[crc32]/include/ directory.
2) To ensure things work you should *unlock* the forum's files either by hand (not recommended) or by using the File Unlock admin control panel.
The error you are experiencing is due to missing inclusion of the eGW's SQL layer on top of which FUD's SQL functions are built in FUDforum/eGW.
To fix this try adding the following code to maillist.php after GLOBALS.php inclusion.
<?php require_once('/path/to/egw/header.inc.php'); if (!empty($GLOBALS['phpgw_info']['server']['use_adodb'])) { // open your own connection, as ADOdb does not export the use Link_ID switch ($GLOBALS['phpgw_info']['server']['db_type']) { case 'mysql': $func = $GLOBALS['phpgw_info']['server']['db_persistent'] ? 'mysql_pconnect' : 'mysql_connect'; define('fud_sql_lnk',$func($GLOBALS['phpgw']->db->Host, $GLOBALS['phpgw']->db->User, $GLOBALS['phpgw']->db->Password)); mysql_select_db($GLOBALS['phpgw']->db->Database,fud_sql_lnk); break;
case 'pgsql': $func = $GLOBALS['phpgw_info']['server']['db_persistent'] ? 'pg_pconnect' : 'pg_connect'; define('fud_sql_lnk',$func('dbname='.$GLOBALS['phpgw']->db->Database. ' host='.$GLOBALS['phpgw']->db->Host. ' user='.$GLOBALS['phpgw']->db->User. ' password='.$GLOBALS['phpgw']->db->Password)); break;
default: die('FUDforum only supports mysql or pgsql !!!'); } unset($func); } else { define('fud_sql_lnk', $GLOBALS['phpgw']->db->Link_ID); } ?>
FUDforum Core Developer
|
|
|
Re: problems with maillist.php (mailing list 2 forum) [message #16869 is a reply to message #16868] |
Wed, 25 February 2004 07:02 |
oblomov
Messages: 12 Registered: February 2004
Karma: 0
|
Junior Member |
|
|
Ilia wrote on Tue, 24 February 2004 20:06 |
Before we proceed one thing to keep in mind, you should disable user creation, since in eGW schema FUDforum does not have the ability to autonomously create users like the standalone version can.
|
ok, I don't need that and it's not active.
Quote: |
Now on with the show
|
Quote: |
1) GLOBALS.php should be a symlink not a copy of the GLOBALS.php inside the appropriate fudforum/[crc32]/include/ directory.
|
Oh yeah I knew that but I have no shell access to the server and at the moment (while testing) resulted easier to do a simple copy, I'll do a symlink and arrange better all permissions when I'll understand things can work
Quote: |
2) To ensure things work you should *unlock* the forum's files either by hand (not recommended) or by using the File Unlock admin control panel.
|
I did it but nothing seemed to change, it always says "unlocked" (whether I lock or unlock it) with no error messages. I tried it with egw administrator password. Anyway that is not a prbolem anymore because I did it by hand (apparently correctly).
Quote: |
The error you are experiencing is due to missing inclusion of the eGW's SQL layer on top of which FUD's SQL functions are built in FUDforum/eGW.
|
so it is actually a EGW problem and not a fudforum problem right?
It was hard suspecting EGW wants his SQL layer be used for fudforum anyway...
Quote: |
To fix this try adding the following code to maillist.php after GLOBALS.php inclusion.
[...]
|
Ok, I did: that was definitively another step ahed!
After this I still had bounces with this message:
MDA bounce unset flag output error report |
!!! YOU DO NOT HAVE YOUR $GLOBALS['phpgw_info']['flags']['currentapp'] SET !!!<br>!!! PLEASE CORRECT THIS SITUATION !!!
|
That was pretty clear (even though I think it's useless to have that flag set in this situation) so I added a simple
<?php $GLOBALS['phpgw_info']['flags']['currentapp'] = 'fudforum'; ?>
before your code: 'fudforum' is the name you find for fudforum in the phpgw_applications egw table for fudforum (sorry to write all these details but I really hope this will be useful to other persons that might experience the same problem). That corrected the problem.
Now I'm just getting bounces with empty error messages (I mean: just empty lines), I mean:
MDA bounce output error report |
The following text was generated during the delivery attempt:
------ pipe to |/<pathtomaillist>/maillist.php 1
generated by <myaddress> ------
------ This is a copy of the message, including all the headers. ------
|
That's a problem I've already had with MDA piped scripts as teh MDA think it's an error if they are generating even blank lines I think.
The problem is that mailllist by itself seems generating none (no space after ?> and before <?php) so there might be some other include generating blank lines... anybody knows how a workaround this problem? (there might be a simple one I'm missing I'm sure...)
Thank you very much for your help until now anyway!!!!
[Updated on: Wed, 25 February 2004 07:11] Report message to a moderator
|
|
|
|
|
|
|
Re: problems with maillist.php (mailing list 2 forum) [message #16893 is a reply to message #16891] |
Thu, 26 February 2004 19:45 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
I am not sure where the blank lines are comming from, I doubt very much they are from one of the forum's includes.
you can use output buffering to supress stdout messages and make PHP not print errors to screen (log to a file) to supress stderr.
FUDforum Core Developer
|
|
|
|