FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » errors in the user creation process
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
errors in the user creation process [message #18055] Tue, 04 May 2004 05:15 Go to next message
lahoo is currently offline  lahoo   Sweden
Messages: 62
Registered: April 2004
Karma: 0
Member
I did a clean install yesterday and everything went well until I simulated a new user regestering for an account.

The form weher the user populates his/her profile works but when the form is posted I get
>Warning: implode(): Bad arguments. in .../forum/theme/default/register.php on line 1228

This is followed by the following but this is most probably just a side effect.
>Warning: Cannot modify header information - headers already sent by (output started at
>.../forum/theme/default/register.php:1228) in
>.../forum/theme/default/register.php on line 1894

The user account is created but getting an error like this will scare members away.

What's the problem and how can it be fixed?

Here's the system config information
>PHP built On: Linux ws4.surf-town.net 2.6.5 #2 SMP Mon Apr 12 23:11:07 CEST 2004 i686
>Database Version: 4.0.16-standard
>PHP Version: 4.3.6
>Web Server: Apache/1.3.29 (Unix) Sun-ONE-ASP/4.0.0 mod_ssl/2.8.16 OpenSSL/0.9.6b FrontPage/5.0.2.2635 PHP/4.3.6 mod_throttle/3.1.2
>WebServer to PHP interface: apache
>Forum Version: 2.6.2
>Relavent PHP Settings: Safe Mode: ON
>Open basedir: none
>Display Errors: ON
>File Uploads: ON
>Magic Quotes: ON
>Register Globals: ON
>Output Buffering: No
>Disabled Functions: none
>PDF Support: No
>Tokenizer Support: Yes
>PSpell Support: No
>Zlib Support: Yes


-----------------

The error is generated by the red row below. The code is not easy to follow due to lack of comments and weird programming.

function send_email($from, $to, $subj, $body, $header='')
{
if (empty($to) || !count($to)) {
return;
}
$body = str_replace('\n', "\n", $body);
$subj = encode_subject($subj);

if ($GLOBALS['FUD_OPT_1'] & 512) { //Which value in the agmin control panel does this bit corespond to?
if (!class_exists('fud_smtp')) {
fud_use('smtp.inc');
}
$smtp = new fud_smtp;
$smtp->msg = str_replace("\n.", "\n..", $body);
$smtp->subject = $subj;
$smtp->to = $to;
$smtp->from = $from;
$smtp->headers = $header;
$smtp->send_smtp_email();
} else {
$bcc = '';

if (is_array($to)) {
$to = ' ';
$bcc = 'Bcc: ' . implode(', ', $to); }
//Since $to is set to a specific value I don't see the point in making this piece of code so complicated. This must be a bug!
if ($header) {
$header = "\n" . str_replace("\r", "", $header);
} else if ($bcc) {
$bcc = "\n" . $bcc;
}

if (version_compare("4.3.3RC2", phpversion(), ">")) {
$body = str_replace("\n.", "\n..", $body);
}

mail($to, $subj, str_replace("\r", "", $body), "From: ".$from."\nErrors-To: ".$from."\nReturn-Path: ".$from."\nX-Mailer: FUDforum v".$GLOBALS['FORUM_VERSION'].$header.$bcc);
}
}

[Updated on: Wed, 05 May 2004 05:55]

Report message to a moderator

Re: errors in the user creation process [message #18067 is a reply to message #18055] Wed, 05 May 2004 12:33 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Netherlands
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The notification code is completely different in CVS and should not have any problems.

FUDforum Core Developer
Re: errors in the user creation process [message #18071 is a reply to message #18067] Wed, 05 May 2004 12:39 Go to previous messageGo to next message
lahoo is currently offline  lahoo   Sweden
Messages: 62
Registered: April 2004
Karma: 0
Member
So, which files shall I update from CVS to get working notifications in 2.6.2?
Is the CVS repository available through web browsing?
Where is it found?
Re: errors in the user creation process [message #18072 is a reply to message #18071] Wed, 05 May 2004 12:49 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Netherlands
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Look at the description of the patches on the online changelog, this will allow you to download the patches themselves as well.
As far as the CVS repository, there is no web interface to it.


FUDforum Core Developer
Re: errors in the user creation process [message #18074 is a reply to message #18072] Wed, 05 May 2004 14:03 Go to previous messageGo to next message
lahoo is currently offline  lahoo   Sweden
Messages: 62
Registered: April 2004
Karma: 0
Member
Most certainly it is the patch http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=2632 that applies.

Which patch tool do you recommend?
I could do it by hand but it might be a risque.
Re: errors in the user creation process [message #18080 is a reply to message #18074] Thu, 06 May 2004 12:14 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Netherlands
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I use patch utility on linux (yes, it's called patch). On other OSes I cannot give any suggestions since I simply do not know.

FUDforum Core Developer
Re: errors in the user creation process [message #18086 is a reply to message #18080] Thu, 06 May 2004 14:32 Go to previous messageGo to next message
lahoo is currently offline  lahoo   Sweden
Messages: 62
Registered: April 2004
Karma: 0
Member
Is that the GNU patch tool? Then I'll just update my CygWin installation to add it.
Re: errors in the user creation process [message #18087 is a reply to message #18086] Thu, 06 May 2004 14:37 Go to previous message
Ilia is currently offline  Ilia   Netherlands
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
yes.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Cannot create forums
Next Topic: Problems with 2.6.3RC2 and Firefox
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 15:23:22 GMT 2024

Total time taken to generate the page: 0.02544 seconds