Fatal error: Cannot redeclare message_die() (previously declared in c:\program files\easyphp1-7\www\mailhack.php:7) in c:\program files\easyphp1-7\www\includes\functions.php on line 558
has anyone found a fix for this one
Bubba Nuke Cadet
Joined: Jan 03, 2004
Posts: 8
Posted:
Mon Dec 06, 2004 9:18 am
Bubba wrote:
i myself is getting
Fatal error: Cannot redeclare message_die() (previously declared in c:\program files\easyphp1-7\www\mailhack.php:7) in c:\program files\easyphp1-7\www\includes\functions.php on line 558
you need to either take out that function or comment it out down to
Code:
function bblogin($nukeuser, $session_id) {
which is roughly 200 lines of code so happy fixes
Hawkeye_nl Nuke Cadet
Joined: Feb 14, 2005
Posts: 2
Posted:
Mon Feb 14, 2005 12:11 pm
I have a compaq server running linux redhead 9.0
I have my site bilded in phpnuke 7.6
I have changed what you tell uw before and put in the file "mailhack.php"
After that I have changed the login id and the smtp adres in this file and also in the file "includes.smtp.php"
After doing this It's possible to fill out the form, check if all is like you wishes and send the e-mail for confirmation. I even get the page that says:
Your request for a new account has been processed. You'll receive an email in the next few seconds with a activation link that should be visited in the next 24 hours to be able to activate your account.
But the mail never apears in the inboxes of those who dit fil out the form.
What can be the problem?
Hawkeye
The Macaw Club Holland (http://84.81.13.86 not active yet!)
Hawkeye_nl Nuke Cadet
Joined: Feb 14, 2005
Posts: 2
Posted:
Fri Feb 18, 2005 3:14 am
OK, The problem I hat before is solved. The mail function is working for 80 to 90%.
The only problem I''ll seem to have now is when I try to send a newsletter to subscribed users or all members. The first mail get to the adressed but the rest seems not to get the mail at all.
I get the next message:
Cannot redeclare server_parse() (previously declared in ...\includes\smtp.php:66) in ..\includes\smtp.php on line 66
Taking out the mailhack.php dit not solveed this problem and created more problems.
Regards,
Hawkeye_nl
Godbuster Nuke Cadet
Joined: Apr 21, 2005
Posts: 4
Location: Georgia
Posted:
Thu Apr 21, 2005 6:40 pm
Um..I saw the problem addressed earlier, but I'm still having a problem. I keep getting this error messege
Code:
Fatal error: Call to undefined function: message_die() in /home/www/phptesterx.coconia.net/includes/smtp.php on line 78
If anyone could help me, I'd really apreciate it. Reply here or hit me up on MSN at godbuster@hotmail.com
Rockdrala Sergeant
Joined: Aug 09, 2005
Posts: 97
Posted:
Tue Aug 23, 2005 11:54 pm
Thanks god somebody is familiar with this... I am running php nuke 7.7 with nntonuke2.17.. its a fresh install... I wanna know where can I set up the email settings for both the integrated forum and the nuke to use my outside smtp server and how can I change it to port 587 instead of 25?
Rockdrala Sergeant
Joined: Aug 09, 2005
Posts: 97
Posted:
Wed Aug 24, 2005 3:09 am
the email hack on working on my 7.7 I have a sneakey feeling
my usercp_email.php has something to do with it... does it?
<?php
/***************************************************************************
* usercp_email.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: usercp_email.php,v 1.7.2.13 2003/06/06 18:02:15 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
* phpbb2 forums port version 2.0.5 (c) 2003 - Nuke Cops (http://nukecops.com)
*
* Ported by Nuke Cops to phpbb2 standalone 2.0.5 Test
* and debugging completed by the Elite Nukers and site members.
*
* You run this package at your sole risk. Nuke Cops and affiliates cannot
* be held liable if anything goes wrong. You are advised to test this
* package on a development system. Backup everything before implementing
* in a production environment. If something goes wrong, you can always
* backout and restore your backups.
*
* Installing and running this also means you agree to the terms of the AUP
* found at Nuke Cops.
*
* This is version 2.0.5 of the phpbb2 forum port for PHP-Nuke. Work is based
* on Tom Nitzschner's forum port version 2.0.6. Tom's 2.0.6 port was based
* on the phpbb2 standalone version 2.0.3. Our version 2.0.5 from Nuke Cops is
* now reflecting phpbb2 standalone 2.0.5 that fixes some bugs and the
* invalid_session error message.
***************************************************************************/
/***************************************************************************
* This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
* by Tom Nitzschner (tom@toms-home.com)
* http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
*
* As always, make a backup before messing with anything. All code
* release by me is considered sample code only. It may be fully
* functual, but you use it at your own risk, if you break it,
* you get to fix it too. No waranty is given or implied.
*
* Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
* then on my site. All original header code and copyright messages will be maintained
* to give credit where credit is due. If you modify this, the only requirement is
* that you also maintain all original copyright messages. All my work is released
* under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
// Is send through board enabled? No, return to index
if (!$board_config['board_email_form'])
{
redirect(append_sid("index.$phpEx", true));
}
OKAY AFTER APPLYING THE HACK I TRY SEND AN EMAIL TO ANOTHER I GET THE ERROR MESSAGE CANNOT CONNECT TO SMTP SERVER 65
ERROR ON LINE 150
I OPENED MY SMTP.PHP and I COULDNT FIND LINE 150 BECUASE IT DOESNT HAVE THEM LISTED RIGHT>>> THEY ARE LIKE HORIZONTAL TAKE A LOOK< WHICH LINE IS LINE 150?
<?php
/***************************************************************************
* smtp.php
* -------------------
* begin : Wed May 09 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: smtp.php,v 1.16.2.5 2003/06/12 19:20:20 acydburn Exp $
*
***************************************************************************/
/***************************************************************************
* phpbb2 forums port version 2.0.5 (c) 2003 - Nuke Cops (http://nukecops.com)
*
* Ported by Nuke Cops to phpbb2 standalone 2.0.5 Test
* and debugging completed by the Elite Nukers and site members.
*
* You run this package at your sole risk. Nuke Cops and affiliates cannot
* be held liable if anything goes wrong. You are advised to test this
* package on a development system. Backup everything before implementing
* in a production environment. If something goes wrong, you can always
* backout and restore your backups.
*
* Installing and running this also means you agree to the terms of the AUP
* found at Nuke Cops.
*
* This is version 2.0.5 of the phpbb2 forum port for PHP-Nuke. Work is based
* on Tom Nitzschner's forum port version 2.0.6. Tom's 2.0.6 port was based
* on the phpbb2 standalone version 2.0.3. Our version 2.0.5 from Nuke Cops is
* now reflecting phpbb2 standalone 2.0.5 that fixes some bugs and the
* invalid_session error message.
***************************************************************************/
/***************************************************************************
* This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
* by Tom Nitzschner (tom@toms-home.com)
* http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
*
* As always, make a backup before messing with anything. All code
* release by me is considered sample code only. It may be fully
* functual, but you use it at your own risk, if you break it,
* you get to fix it too. No waranty is given or implied.
*
* Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
* then on my site. All original header code and copyright messages will be maintained
* to give credit where credit is due. If you modify this, the only requirement is
* that you also maintain all original copyright messages. All my work is released
* under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('SMTP_INCLUDED', 1);
//
// This function has been modified as provided
// by SirSir to allow multiline responses when
// using SMTP Extensions
//
function server_parse($socket, $response, $line = __LINE__)
{
while (substr($server_response, 3, 1) != ' ')
{
if (!($server_response = fgets($socket, 256)))
{
message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", $line, __FILE__);
}
}
// Replacement or substitute for PHP's mail command
function smtpmail($mail_to, $subject, $message, $headers = '')
{
global $board_config;
// Fix any bare linefeeds in the message to make it RFC821 Compliant.
$message = preg_replace("#(?<!\r)\n#si", "\r\n", $message);
if ($headers != '')
{
if (is_array($headers))
{
if (sizeof($headers) > 1)
{
$headers = join("\n", $headers);
}
else
{
$headers = $headers[0];
}
}
$headers = chop($headers);
// Make sure there are no bare linefeeds in the headers
$headers = preg_replace('#(?<!\r)\n#si', "\r\n", $headers);
// Ok this is rather confusing all things considered,
// but we have to grab bcc and cc headers and treat them differently
// Something we really didn't take into consideration originally
$header_array = explode("\r\n", $headers);
@reset($header_array);
if (trim($subject) == '')
{
message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__);
}
if (trim($message) == '')
{
message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__);
}
// some code was removed here for 2.0.6
// Ok we have error checked as much as we can to this point let's get on
// it already.
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}
// Wait for reply
server_parse($socket, "220", __LINE__);
// Do we want to use AUTH?, send RFC2554 EHLO, else send RFC821 HELO
// This improved as provided by SirSir to accomodate
if( !empty($board_config['smtp_username']) && !empty($board_config['smtp_password']) )
{
fputs($socket, "EHLO " . $board_config['smtp_host'] . "\r\n");
server_parse($socket, "250", __LINE__);
// From this point onward most server response codes should be 250
// Specify who the mail is from....
fputs($socket, "MAIL FROM: <" . $board_config['board_email'] . ">\r\n");
server_parse($socket, "250", __LINE__);
// Specify each user to send to and build to header.
$to_header = '';
// Add an additional bit of error checking to the To field.
$mail_to = (trim($mail_to) == '') ? 'Undisclosed-recipients:;' : trim($mail_to);
if (preg_match('#[^ ]+\@[^ ]+#', $mail_to))
{
fputs($socket, "RCPT TO: <$mail_to>\r\n");
server_parse($socket, "250", __LINE__);
}
// Ok now do the CC and BCC fields...
@reset($bcc);
while(list(, $bcc_address) = each($bcc))
{
// Add an additional bit of error checking to bcc header...
$bcc_address = trim($bcc_address);
if (preg_match('#[^ ]+\@[^ ]+#', $bcc_address))
{
fputs($socket, "RCPT TO: <$bcc_address>\r\n");
server_parse($socket, "250", __LINE__);
}
}
@reset($cc);
while(list(, $cc_address) = each($cc))
{
// Add an additional bit of error checking to cc header
$cc_address = trim($cc_address);
if (preg_match('#[^ ]+\@[^ ]+#', $cc_address))
{
fputs($socket, "RCPT TO: <$cc_address>\r\n");
server_parse($socket, "250", __LINE__);
}
}
// Ok now we tell the server we are ready to start sending data
fputs($socket, "DATA\r\n");
// This is the last response code we look for until the end of the message.
server_parse($socket, "354", __LINE__);
// Send the Subject Line...
fputs($socket, "Subject: $subject\r\n");
// Now the To Header.
fputs($socket, "To: $mail_to\r\n");
// Now any custom headers....
fputs($socket, "$headers\r\n\r\n");
// Ok now we are ready for the message...
fputs($socket, "$message\r\n");
// Ok the all the ingredients are mixed in let's cook this puppy...
fputs($socket, ".\r\n");
server_parse($socket, "250", __LINE__);
// Now tell the server we are done and close the socket...
fputs($socket, "QUIT\r\n");
fclose($socket);
return TRUE;
}
?>
Rockdrala Sergeant
Joined: Aug 09, 2005
Posts: 97
Posted:
Wed Aug 24, 2005 3:26 am
Your Forum aligned my stmp.php, sweet!
Now if im not mistaking line 150 is
message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__);
I would get the error message "No email Subject specified" when I clicked submit, but it had a Subject!
So I Clicked Submit again and then when I got the Error in line 150 in smtp.php could not connect to host... is my subject field messed up somehow?
This is trying to send an email to another user email on there... the PM's go through fine, I I went in the Forum, looked through the memberlist and picked one out and tried to send them an email after installing the Email HAck... and that is whats happening to me....
Rockdrala Sergeant
Joined: Aug 09, 2005
Posts: 97
Posted:
Wed Aug 24, 2005 3:29 am
I also have a different theme than subsilver im using would this cause my subject field to screw up even though it has subject?
Rockdrala Sergeant
Joined: Aug 09, 2005
Posts: 97
Posted:
Wed Aug 24, 2005 3:31 am
Hey is this line
// Ok we have error checked as much as we can to this point let's get on
// it already.
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
The STRANGEST THING HAPPENED.. all i did was change the port number from 25 to 587 and its working now...
It must be a port block on 25 from the ISP or something,,, No more error messages are popping up...
jedimasta Nuke Cadet
Joined: Aug 29, 2005
Posts: 7
Posted:
Mon Aug 29, 2005 8:21 am
Time to revisit this, I suppose. I was having problems in sending newsletters. The original fix on the first page worked like a charm. Messages seem to be getting through no problem.
One quick thing though, after sending a newsletter, the page refreshes to blank white. Before changing the function, I'd get the "your newsletter has been sent". Now I get nothing. I wouldn't have too much of a problem with it, but I'm trying to make the site as dummy proof as possible for our main user. Any thoughts?
Using phpnuke 7.7
Rockdrala Sergeant
Joined: Aug 09, 2005
Posts: 97
Posted:
Wed Aug 31, 2005 3:08 am
yeah Jedi defienteley change your port numbers after you implement the smtp hack by disgruntlet tech.. it took me abour 5 hours playing with to find where to change the port number...
Look for this in smtp.php
// some code was removed here for 2.0.6
// Ok we have error checked as much as we can to this point let's get on
// it already.
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
That 25 there is the port number... I changed mine to 587
The reason why you should change the port number is becuase whenever anybody like susie in ny or bobby in florida tries to send mail... their isp may have put on block 25... Bellsouth does (really sucks) I called Bellsouth and they wont take it theirs off becuase its part of their nampty pampty anti-spam commitee... I told them they only need to block reported ip's spam and they cant their policy and shove it up their you know what... for example
Susie is browsing a php site called how to get guys and wants to register becuase she wants to post a comment... she gets an error when when she clicks submit
error 65 no route to server
error on line 150 in smtp.php
thats becuase the mailer tried to use port 25 and her isp filters port 25
Now lets say pyschop bobby is spying the site how to get guys to write an article for maxim called what chicks think..
He signups under an anonymous name etc...
when he clicks submit it goes through and he gets his email in outlook express etc...
Thats becuase the internet service he uses doesnt filter port 25...
If you run your own smtp server i def recommend changing the port settings...
Or call your domain host for the port 25 filter "workaround port number"...
Yahoo's workaround port number is 587... The one I use
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum