Old 04-16-2005   #1 (permalink)
Registered User
 
Join Date: Apr 2005
Posts: 2

Unhappy Membership Script Error

hey
i went through the whole membership tutorial and got everything up on my server...but after i enter my information in the register page, its says

Quote:
We are sorry, there appears to be a problem with our script at the moment.
what should i do?
indianguy8897 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04-17-2005   #2 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
hmm, i've had many help calls about this tutorial but this hasn't come up yet, i'll just have a look at the code.

ok, that error will show when either the mysql query failed, or the mail sending failed. having a look at the code, the query has got mysql_error() in the or die clause, so if it were a mysql query error, then you would see it. so that must mean it's a problem with sending the email. here are a couple of things you can do to try and fix it up:

- put the following code into a file called phpinfo.php and run it:
Code:
<?php echo phpinfo() ?>
check to see what these things are under configuration - php core:
--- safe_mode: if it says on, you will have to find out a new way to try and send emails
--- SMTP
--- sendmail_from
--- sendmail_path

the last 3 are the main 3 configuration settings that correspond to sending emails, check to see what is set in those fields.

you can try running a test on mail():
Code:
<?php mail("your@email.com","testing","testing..."); ?>
substitute your email address for your@email.com, and if you recieve an email, then the script should work, but there's probably a problem with the additional headers that mail() is trying to send.

if you don't get an email after running that script, then your server doesn't allow mail() sending of emails. there are alternatives, you could rewrite the mail function.

[ script from php.net/mail comments: scott at criticalpath dot com ]
Code:
<?php
function sendmail($to='', $subject='', $message='', $headers='', $extra='')
{
   $fd = popen("/usr/sbin/sendmail -t $extra", 'w');

   fputs($fd, "To: $to\n");
   fputs($fd, "Subject: $subject\n");
   fputs($fd, "X-Mailer: PHP4\n");

   if ($headers) {
       fputs($fd, "$headers\n");
   }

   fputs($fd, "\n");
   fputs($fd, $message);
   pclose($fd);
}
?>
so if you conclude that your server doesn't allow mail(), change mail() to sendmail() in the membership script, and add that function into the code at the top of the page below include 'config.php';.

if nothing works, contact me and i will figure out another way for you to register and activate your users, you may have to abandon activation and just have regular registration.

good luck
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04-17-2005   #3 (permalink)
Registered User
 
Join Date: Apr 2005
Posts: 2

Question problem solved...but i have another

well apparently it was some kind of problem with the mySQL server and database...now that thats solved, i have yet another problem

this time, i register, get an activation email, and activate my account. but when i go to the login page, it gives the problem i know a lot of other people have had...

Quote:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/finaldot/public_html/Biorust/login.php:1) in /home/finaldot/public_html/Biorust/login.php on line 2
Quote:
Warning: Cannot modify header information - headers already sent by (output started at /home/finaldot/public_html/Biorust/login.php:1) in /home/finaldot/public_html/Biorust/login.php on line 27
ive seen these problems elsewhere...i just cant remember where
so if you can help me out...AGAIN
it would help
btw thanks for your quick response to my earlier problem...this site is awesome
thanks again
dan
indianguy8897 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 04-17-2005   #4 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
refer to: http://forums.biorust.com/showthread.php?t=1432 (Complete Membership Tutorial Error)
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 03:52 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT