View Full Version : phpBB thingy?
gino x
12-20-2003, 1:11 PM
Ok, so my question is that how can I change the yourdomain.com thing on my phpbb forums?
I'm a n00b to these kinds of things, so please go easy on me :)
My site is http://z0r.ath.cx
My phpbb forum is http://z0r.ath.cx/forum
The server that it's on is generally up during daytime (PST ;)
Mntsnow
12-20-2003, 3:58 PM
You change that in the Config.php file normally or you can change it in the admin section of your forums
Mntsnow
12-20-2003, 4:02 PM
You also need to config your email.php file to have Read and execute permissions so people can register for your forum ;)
gino x
12-20-2003, 4:15 PM
Ah yes that too :)
Thanks for the pointers ;)
gino x
12-20-2003, 4:52 PM
Bah...the admin section has zilch on changing the name =\
My config.php has nothing relevant either, its self generated and it says that it shouldn't be edited.
I can't set my emailer.php to Read and Execute, just Read :( (I'm a total dummy when it comes to IIS)
diveram
12-20-2003, 6:41 PM
Hi gino x, I use phpbb on my site www.learntoscuba.net/phpbb2 I have gotten quite good at it. I modded mine quite a bit too. If you need help I am here for ya!
In the Administration control panel under General configuration, click on configuration. The 3rd line down type in your site name, and under that on the 4th line type in site description.
If you need more help, just ask!
gino x
12-20-2003, 6:45 PM
Ah yes, I should have seen that :)
Also how can I set the emailer.php in the /includes folder to be Read and Execute?
I'm using IIS 5.0 on Windows 2000 Pro.
Nice site btw :)
diveram
12-20-2003, 6:49 PM
Are you running your mail server? Is is on the same box?
gino x
12-20-2003, 6:59 PM
Yus, my mail server is on the same box :)
I had nothing better to use other than the IIS SMTP server :o
diveram
12-20-2003, 7:05 PM
ooohhh, this may stump me, but remember during start-up the beginning config screen. Its been a while but somewhere it asked for a mail option. I used localhost, because my mail is on the same box here too. Give me time to dig aroun on my sys and see if I cant come up with something. Also in the admin menue, under config, like the above post, scrool way down you should see a e-mail setting section.
you should see this line "Use SMTP Server for email" try setting that to off and see what it does. If its already off then set it to on and see.
gino x
12-20-2003, 7:07 PM
Alright. The Use SMTP server for email was originally off, then I turned it on and entered the settings in. :)
diveram
12-20-2003, 7:11 PM
And did it work? Send me mail thru your board to test. I registered as GrandMasterB :)
gino x
12-20-2003, 7:13 PM
This was when a new user wished to join, after submitting all the info, I'd get an error about the email not being sent.
Was at line 234 in emailer.php :O
Did you get that error?
diveram
12-20-2003, 7:14 PM
yes, but I joined before the settings, why don't you kill my status and I will try to reg again.
gino x
12-20-2003, 7:16 PM
Ok then :)
diveram
12-20-2003, 7:23 PM
Error on line 111 under smtp.php. I am checking my php files, hold tight! Error on line 109 also.
I checked my emailer.php file and I only have 174 lines not 234. But you are running 2.0.6 I have 2.0.5.
diveram
12-20-2003, 7:26 PM
Humm, I don't have those lines, I have up to 79 on smtp.php...Copy those lines for me so I can compare them to mine for ya!
gino x
12-20-2003, 7:27 PM
Ah, that is true! Lots of goodies in 2.0.6
Maybe you should upgrade when you have the time? ;)
gino x
12-20-2003, 7:34 PM
Ok heres the lines you wanted!
Beware, its kinda long.
<?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.9 2003/07/18 16:34:01 acydburn Exp $
*
************************************************** *************************/
/************************************************** *************************
*
* 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__);
}
}
if (!(substr($server_response, 0, 3) == $response))
{
message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", $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);
$headers = '';
while(list(, $header) = each($header_array))
{
if (preg_match('#^cc:#si', $header))
{
$cc = preg_replace('#^cc:(.*)#si', '\1', $header);
}
else if (preg_match('#^bcc:#si', $header))
{
$bcc = preg_replace('#^bcc:(.*)#si', '\1', $header);
$header = '';
}
$headers .= ($header != '') ? $header . "\r\n" : '';
}
$headers = chop($headers);
$cc = explode(', ', $cc);
$bcc = explode(', ', $bcc);
}
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__);
}
// 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__);
fputs($socket, "AUTH LOGIN\r\n");
server_parse($socket, "334", __LINE__);
fputs($socket, base64_encode($board_config['smtp_username']) . "\r\n");
server_parse($socket, "334", __LINE__);
fputs($socket, base64_encode($board_config['smtp_password']) . "\r\n");
server_parse($socket, "235", __LINE__);
}
else
{
fputs($socket, "HELO " . $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;
}
?>
gino x
12-20-2003, 7:36 PM
Well I gtg right now :(
Thanks for all the help so far though, I really appreciate it :)
diveram
12-20-2003, 7:43 PM
Ok, kinda much..open smtp.php in notebook, under edit click goto and type in 109, then copy that single line for me. Do the same for 111. LOL
gino x
12-20-2003, 9:52 PM
Alrighty then :)
gino x
12-20-2003, 9:55 PM
Lets see::
Line 109
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
Line 111
message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
diveram
12-20-2003, 10:14 PM
Do you have port 25 open? Does your isp block port 25?
gino x
12-20-2003, 10:52 PM
Alright then, problem solved. Seems that my SMTP server somehow got fudged (the one in IIS). So I have reverted to a free SMTP server software and everything works fine!
Thanks MntSnow and diveram ;)
Nah, my isp doesn't block those ports.
diveram
12-20-2003, 10:57 PM
Cool, I was really starting to think it wasn't phpbb, but the mail server. Da Snowman had it right the first few posts. Good luck with your site!
gino x
12-20-2003, 11:03 PM
Thanx! Snowman led towards the right path and you guided me :)
Good luck with your forums too!
mholtum
12-20-2003, 11:11 PM
Notice: Undefined index: QUERY_STRING in D:\web\e107\class2.php on line 49
Notice: Undefined variable: link_prefix in D:\web\e107\class2.php on line 51
Notice: Undefined index: DOCUMENT_ROOT in D:\web\e107\class2.php on line 60
Bummer
gino x
12-20-2003, 11:26 PM
Yeah =\
That one's a PITA too. Will try to resolve that too :)
mholtum
12-20-2003, 11:28 PM
You should try vBulletin.. Not free, but nice.. This site runs it as mine does as well http://www.ravensrealm.net
gino x
12-20-2003, 11:43 PM
Nice... :)
I jsut don't have the money to shell out for those quality forums and I really don't believe in piracy.
mholtum
12-21-2003, 1:10 AM
Have you tried Invision Board? Free and Nice.. http://www.invisionboard.com/
gino x
12-21-2003, 9:56 AM
Hmmm IPB. Heard of it before :)
Maybe I'll setup a test section for it.
mholtum
12-21-2003, 9:59 AM
I used it before I was using vBulletin. Even comes with a Portal
gino x
12-21-2003, 10:01 AM
Doesn't seem free. According to their page, I gotta get a license =\
I thought it was though.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.