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
Return to the default flat view Create a new topic Submit Reply
errors in the user creation process [message #18055] Tue, 04 May 2004 05:15 Go to previous message
lahoo is currently offline  lahoo   Sweden
Messages: 62
Registered: April 2004
Karma:
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

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Mon Nov 25 23:09:48 GMT 2024

Total time taken to generate the page: 0.04164 seconds