pboehi
Noobie
Posts: 11
I'm a llama!
|
|
Re:YaBB SE 1.5.5 Released!
« Reply #7 on: January 17, 2004, 10:34:38 PM » |
|
I tried to run the update mod but before doing so I tested it and got two error messages (string not found). These two strings were not found:
********
$loadphpver = 'YaBB SE 1.5.1';
/* this function is called from index.php - it loads the cookies for the board and places the critical variables into the right place $username - the username of the logged in person, or 'Guest' $password - the doubly encrypted password stored in the cookie*/ function LoadCookie() { global $password, $username, $cookiename;
if (isset($_COOKIE[$cookiename])) { list($username, $password) = @unserialize(stripslashes($_COOKIE[$cookiename])); $username = ($username != '') ? $username : 'Guest'; }
**** and ****
unction sendmail($to, $subject, $message, $from = null) { global $mailtype, $webmaster_email, $modSettings;
$chunkSize = 50;
$to_array = (is_array($to) ? $to : array($to));
if ($from == null) $from = $webmaster_email; $subject = stripslashes($subject); $subject = str_replace(array('"', ''', '&', '<', '>'), array('"', '\'', '&', '<', '>'), $subject); $message = stripslashes($message); $headers = "MIME-Version: 1.0\r\n"; $headers .= "From: <$webmaster_email>\r\n"; $headers .= "Return-Path: $webmaster_email";
if ($modSettings['mail_type'] == 'sendmail') foreach ($to_array as $to) $mail_result = mail($to, $subject, $message, $headers); else smtp_mail($to_array, $subject, $message, $headers);
return $mail_result; }
function smtp_mail($mail_to_array, $subject, $message, $headers) { global $modSettings, $webmaster_email;
if (!$socket = fsockopen($modSettings['smtp_host'], 25, $errno, $errstr, 20)) fatal_error("Could not connect to smtp host : $errno : $errstr");
server_parse($socket, '220');
if ($modSettings['smtp_username'] != '' && $modSettings['smtp_password'] != '') { fputs($socket, "EHLO $modSettings[smtp_host]\r\n"); server_parse($socket, '250'); fputs($socket, "AUTH LOGIN\r\n"); server_parse($socket, '334'); fputs($socket, base64_encode($modSettings['smtp_username']) . "\r\n"); server_parse($socket, '334'); fputs($socket, base64_encode($modSettings['smtp_password']) . "\r\n"); server_parse($socket, '235'); } else { fputs($socket, 'HELO ' . $modSettings['smtp_host'] . "\r\n"); server_parse($socket, '250'); } foreach($mail_to_array as $mail_to) { fputs($socket, "MAIL FROM: <$webmaster_email>\r\n"); server_parse($socket, '250'); $to_header = "To: <$mail_to>"; fputs($socket, "RCPT TO: <$mail_to>\r\n"); server_parse($socket, '250'); fputs($socket, "DATA\r\n"); server_parse($socket, '354'); fputs($socket, "Subject: $subject\r\n"); if (strlen($mail_to)) fputs($socket, "$to_header\r\n"); fputs($socket, "$headers\r\n\r\n"); fputs($socket, "$message\r\n"); fputs($socket, ".\r\n"); server_parse($socket, '250'); fputs($socket, "RSET\r\n"); server_parse($socket, '250'); } fputs($socket, "QUIT\r\n"); fclose($socket); }
function server_parse($socket, $response) { while (substr($server_response, 3, 1) != ' ') if (!($server_response = fgets($socket, 256))) fatal_error('Couldn\'t get mail server response codes');
if (!(substr($server_response, 0, 3) == $response)) fatal_error("Ran into problems sending Mail. Error: $server_response"); }
*****
What am I supposed to do?
Peter
|