Hi,
I am using CMSMS 1.2 on Debian Etch 4.0 Linux with the following config:
CMSMailer = 1.73.11
FrontEndUsers = 1.3
CustomContent = 1.4.10
SelfRegistration = 1.1.2
I have tested CMSMailer and it sends me test emails just fine - without incident. I also have FEU working finally after I read the forum and found the missing "&" from the syntax.
Now, however, I cannot get SelfRegistration to work. All I get is a strange SMTP error stating:
Could not get a response from the SMTP server
I do not have captcha support installed...can someone please please provide any hints as to why this might be happening?
On my registration page I use this code:
{cms_module module='SelfRegistration' mode='signup' group='UserInput'}
-p
SelfRegistration Registration Error [solved - but enhancement requested]
SelfRegistration Registration Error [solved - but enhancement requested]
Last edited by pbrady on Wed Nov 14, 2007 4:27 pm, edited 1 time in total.
Re: SelfRegistration Registration Error
Hi,
If it helps anyone help me figure out this problem, I have included the tail from the apache2 access.log file:
192.168.27.160 - - [13/Nov/2007:09:11:59 -0500] "POST /index.php HTTP/1.1" 302 10127 "http://pubs.schnge.com/index.php?page=registration" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9"
192.168.27.160 - - [13/Nov/2007:09:11:59 -0500] "GET /index.php?mact=SelfRegistration,m6,default,1
&m6returnid=99
&m6mode=signup
&m6group=UserInput
&m6returnid=99
&m6hidden_username=username%3B0%3B30%3B2
&m6input_username=johndoe
&m6hidden_name=name%3B0%3B25%3B2
&m6input_name=john%20doe&m6hidden_email=email%3B2%3B25%3B2
&m6input_email=pbrady%40schnge.com
&m6group_id=1
&m6submit=Submit
&m6error=1
&m6message=Could%20not%20get%20a%20response%20from%20the%20SMTP%20server
Any help you can provide is greatly appreciated.
If it helps anyone help me figure out this problem, I have included the tail from the apache2 access.log file:
192.168.27.160 - - [13/Nov/2007:09:11:59 -0500] "POST /index.php HTTP/1.1" 302 10127 "http://pubs.schnge.com/index.php?page=registration" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9"
192.168.27.160 - - [13/Nov/2007:09:11:59 -0500] "GET /index.php?mact=SelfRegistration,m6,default,1
&m6returnid=99
&m6mode=signup
&m6group=UserInput
&m6returnid=99
&m6hidden_username=username%3B0%3B30%3B2
&m6input_username=johndoe
&m6hidden_name=name%3B0%3B25%3B2
&m6input_name=john%20doe&m6hidden_email=email%3B2%3B25%3B2
&m6input_email=pbrady%40schnge.com
&m6group_id=1
&m6submit=Submit
&m6error=1
&m6message=Could%20not%20get%20a%20response%20from%20the%20SMTP%20server
Any help you can provide is greatly appreciated.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: SelfRegistration Registration Error
it's nothing to do with the change settings form what is happening is it's trying to validate the email address by contacting the smtp server for that domain, and it's failing. There used to be an option in the FEU preferences panel to turn off email validation, see if you still have it.
If not, then you'll have to turn off email validation in FrontEndUsers.api.php
If not, then you'll have to turn off email validation in FrontEndUsers.api.php
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: SelfRegistration Registration Error
Hi Calguy,
Thanks for the reply. Unfortunately, nothing I have tried works. I am not a programmer, but took a stab at commenting out the email validation, and it does not work.
Can you tell me exactly what code to comment out? Also, would you consider adding an option to the FEU prefs to disable email validation? Or at least disable the more advanced checks on domain, MX, etc?
I tried two things:
a) I commented out the entire IsValidEmailAddress function only to get an error stating Function Not Defined.
b) I tried to comment out just this section which resulted in no error, but also resulted in no user registration either:
/*
// go ahead and validate the email address further
list ( $uname, $domain ) = split( "@", $email );
if( getmxrr($domain, $mxhost ) )
{
$connectaddress = $mxhost[0];
}
else
{
$connectaddress = $domain;
}
$hostname = 'localhost';
if( isset($_SERVER["SERVER_NAME"]) )
{
$hostname = $_SERVER["SERVER_NAME"];
}
$connect = fsockopen( $connectaddress, 25 );
if( $connect )
{
if( ereg('^220', $out = fgets( $connect, 1024 ) ) )
{
fputs( $connect, "HELO $hostname\r\n");
$out = fgets( $connect, 1024 );
fputs( $connect, "MAIL FROM: \r\n");
$from = fgets( $connect, 1024 );
fputs( $connect, "RCPT TO: \r\n");
$to = fgets( $connect, 1024 );
fputs( $connect, "QUIT\r\n");
fclose( $connect );
if( !ereg( "^250", $from ) || !ereg("^250", $to))
{
$result[0] = false;
$result[1] = $module->Lang('error_serverrejectedemail');
return $result;
}
else
{
$result[0] = false;
$result[1] = $module->Lang('error_noresponsefromserver');
return $result;
}
}
else
{
$result[0] = false;
$result[1] = $module->Lang('error_noresponsefromserver');
return $result;
}
}
}
*/
Please let me know how I can get this working. Sorry to be a pain, but hand editing your code does not seem to be working out for some reason.
Thanks for the reply. Unfortunately, nothing I have tried works. I am not a programmer, but took a stab at commenting out the email validation, and it does not work.
Can you tell me exactly what code to comment out? Also, would you consider adding an option to the FEU prefs to disable email validation? Or at least disable the more advanced checks on domain, MX, etc?
I tried two things:
a) I commented out the entire IsValidEmailAddress function only to get an error stating Function Not Defined.
b) I tried to comment out just this section which resulted in no error, but also resulted in no user registration either:
/*
// go ahead and validate the email address further
list ( $uname, $domain ) = split( "@", $email );
if( getmxrr($domain, $mxhost ) )
{
$connectaddress = $mxhost[0];
}
else
{
$connectaddress = $domain;
}
$hostname = 'localhost';
if( isset($_SERVER["SERVER_NAME"]) )
{
$hostname = $_SERVER["SERVER_NAME"];
}
$connect = fsockopen( $connectaddress, 25 );
if( $connect )
{
if( ereg('^220', $out = fgets( $connect, 1024 ) ) )
{
fputs( $connect, "HELO $hostname\r\n");
$out = fgets( $connect, 1024 );
fputs( $connect, "MAIL FROM: \r\n");
$from = fgets( $connect, 1024 );
fputs( $connect, "RCPT TO: \r\n");
$to = fgets( $connect, 1024 );
fputs( $connect, "QUIT\r\n");
fclose( $connect );
if( !ereg( "^250", $from ) || !ereg("^250", $to))
{
$result[0] = false;
$result[1] = $module->Lang('error_serverrejectedemail');
return $result;
}
else
{
$result[0] = false;
$result[1] = $module->Lang('error_noresponsefromserver');
return $result;
}
}
else
{
$result[0] = false;
$result[1] = $module->Lang('error_noresponsefromserver');
return $result;
}
}
}
*/
Please let me know how I can get this working. Sorry to be a pain, but hand editing your code does not seem to be working out for some reason.
Re: SelfRegistration Registration Error
Hi,
Upon further work on this, I have discovered that trying to remove email validation has an impact on other modules and other snippets of PHP code.
For example, removing the IsValidEmailAddress function from FrontEndUsers.api.php then breaks the FrontEndUsers.module.php. Which wasn't apparent...I had to hunt for it. Once I commented out that function in the FrontEndUsers.module.php code, then I got a Fatal error stating that the SelfRegistration Module's action.reguser.php script called an undefined function.
Calguy, is there an easy work around? I'm not really sure how much code I should be commenting out...and what impact that will have in the long run for upgrades, updates, etc.
Please help!!

-p
Upon further work on this, I have discovered that trying to remove email validation has an impact on other modules and other snippets of PHP code.
For example, removing the IsValidEmailAddress function from FrontEndUsers.api.php then breaks the FrontEndUsers.module.php. Which wasn't apparent...I had to hunt for it. Once I commented out that function in the FrontEndUsers.module.php code, then I got a Fatal error stating that the SelfRegistration Module's action.reguser.php script called an undefined function.
Calguy, is there an easy work around? I'm not really sure how much code I should be commenting out...and what impact that will have in the long run for upgrades, updates, etc.
Please help!!

-p
Re: SelfRegistration Registration Error
OK...sorry for all the messages. As it turns out I got it to work after editing the following files:
action.reguser.php (SelfRegistration Module)
FrontEndUsers.api.php (FrontEndUsers Module)
FrontEndUsers.module.php (FrontEndUsers Module)
Calguy, if possible, can you remove this code in an updated version of the product? I'm not sure why, but it does not work at all for me with this code in.
With the code taken out, I am able to have users receive a "verification email" with code, I receive an email telling me someone registered and life is good.
Thanks as always for your patience and continued work and help on the modules you work on.
Best,
-paul
action.reguser.php (SelfRegistration Module)
FrontEndUsers.api.php (FrontEndUsers Module)
FrontEndUsers.module.php (FrontEndUsers Module)
Calguy, if possible, can you remove this code in an updated version of the product? I'm not sure why, but it does not work at all for me with this code in.
With the code taken out, I am able to have users receive a "verification email" with code, I receive an email telling me someone registered and life is good.

Thanks as always for your patience and continued work and help on the modules you work on.
Best,
-paul
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: SelfRegistration Registration Error [solved - but enhancement requested]
Yeah, the next version of the feu and selfreg modules will remove this functionality.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: SelfRegistration Registration Error [solved - but enhancement requested]
You are the BEST. Thanks man.
-paul
-paul