3 Replies Latest reply on Sep 22, 2008 7:12 AM by (Nick_Jewett)

    forgot password failure

    Level 1
      Please help

      I keep getting this error with the forgot password page, I've rebuilt the included trying to fix this but no luck. The page sends the email it just fails the redirect.

      "Warning: Cannot modify header information - headers already sent by (output started at ........./includes/common/KT_functions.inc.php on line 464"

      Nick
        • 1. Re: forgot password failure
          jefferisp7
          On 9/21/08 6:52 PM, in article 59b68b18.-1@webcrossing.la2eafNXanI,<br />"Nick_Jewett@adobeforums.com" <Nick_Jewett@adobeforums.com> wrote:<br /><br />> Please help<br />> <br />> I keep getting this error with the forgot password page, I've rebuilt the<br />> included trying to fix this but no luck. The page sends the email it just<br />> fails the redirect.<br />> <br />> "Warning: Cannot modify header information - headers already sent by (output<br />> started at ........./includes/common/KT_functions.inc.php on line 464"<br />> <br />> Nick<br />Make sure there are no spaces between closing and opening <?php   ?>   <?php<br />?>  tags in your header. That is a common error.<br />~~~~~~~~~~~~<br />Jefferis Peterson, Pres.<br />Web Design and Marketing<br />http://www.PetersonSales.com
          • 2. Re: forgot password failure
            Level 1
            Thanks for you speedy response. <br /> <br />The forgot_password file was generated by ADTB, I didn't edit it at all, I took the code into WORD and looked for spaces be did not see any. <br /> <br />The error comes up on the forgot_password page so I assume it's not completing this page and not a problem with the re-direct. <br /><?php require_once('Connections/conn_ASBS.php'); ?> <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br />?> <br /><?php<br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br />?> <br /><?php<br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br />?> <br /><?php<br />// Make unified connection variable<br />$conn_conn_ASBS = new KT_connection($conn_ASBS, $database_conn_ASBS);<br />?> <br /> <br /><?php<br />// Start trigger<br />$formValidation = new tNG_FormValidation();<br />$formValidation->addField("email", true, "text", "email", "", "", "");<br />$tNGs->prepareValidation($formValidation);<br />// End trigger<br />?> <br /><?php<br />//start Trigger_ForgotPasswordCheckEmail trigger<br />//remove this line if you want to edit the code by hand<br />function Trigger_ForgotPasswordCheckEmail(&$tNG) {<br />  return Trigger_ForgotPassword_CheckEmail($tNG);<br />}<br />//end Trigger_ForgotPasswordCheckEmail trigger<br />?> <br /><?php<br />//start Trigger_ForgotPassword_Email trigger<br />//remove this line if you want to edit the code by hand<br />function Trigger_ForgotPassword_Email(&$tNG) {<br />  $emailObj = new tNG_Email($tNG);<br />  $emailObj->setFrom("{KT_defaultSender}");<br />  $emailObj->setTo("{email}");<br />  $emailObj->setCC("");<br />  $emailObj->setBCC("");<br />  $emailObj->setSubject("Forgot password email");<br />  //FromFile method<br />  $emailObj->setContentFile("includes/mailtemplates/forgot.html");<br />  $emailObj->setEncoding("ISO-8859-1");<br />  $emailObj->setFormat("HTML/Text");<br />  $emailObj->setImportance("Normal");<br />  return $emailObj->Execute();<br />}<br />//end Trigger_ForgotPassword_Email trigger<br />?> <br /><?php<br />// Make an update transaction instance<br />$forgotpass_transaction = new tNG_update($conn_conn_ASBS);<br />$tNGs->addTransaction($forgotpass_transaction);<br />// Register triggers<br />$forgotpass_transaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1");<br />$forgotpass_transaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);<br />$forgotpass_transaction->registerTrigger("BEFORE", "Trigger_ForgotPasswordCheckEmail", 20);<br />$forgotpass_transaction->registerTrigger("AFTER", "Trigger_ForgotPassword_Email", 1);<br />$forgotpass_transaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "index.php");<br />// Add columns<br />$forgotpass_transaction->setTable("members");<br />$forgotpass_transaction->addColumn("email", "STRING_TYPE", "POST", "email");<br />$forgotpass_transaction->setPrimaryKey("email", "STRING_TYPE", "POST", "email");<br />?> <br /><?php<br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br />?> <br /><?php<br />// Get the transaction recordset<br />$rsmembers = $tNGs->getRecordset("members");<br />$row_rsmembers = mysql_fetch_assoc($rsmembers);<br />$totalRows_rsmembers = mysql_num_rows($rsmembers);<br />?> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <script src="includes/common/js/base.js" type="text/javascript"></script> <br /> <script src="includes/common/js/utility.js" type="text/javascript"></script> <br /> <script src="includes/skins/style.js" type="text/javascript"></script> <br /> <br /><?php echo $tNGs->displayValidationRules();?> <br /> <br /> <br /> <br /> <form method="post" id="form1" action="%3C?php%20echo%20KT_escapeAttribute(KT_getFullUri());%20?%3E"> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <table cellpadding="2" cellspacing="0" class="KT_tngtable"> <tr> <td class="KT_th"> <label for="email">Email:</label> </td> <td> <br /> <input type="text" name="email" id="email" value="<?php echo KT_escapeAttribute($row_rsmembers['email']); ?>" size="32" /> <br /> <?php echo $tNGs->displayFieldHint("email");?> <br /> <?php echo $tNGs->displayFieldError("members", "email"); ?> <br /></td> </tr> <tr class="KT_buttons"> <td colspan="2"> <br /> <input type="submit" name="KT_Update1" id="KT_Update1" value="Submit" /> <br /></td> </tr> </table> <br /> <br /></form> <br /> <p>&#160;</p> <br /> <br /> <br />
            • 3. Re: forgot password failure
              Level 1
              I built a new site from scratch and got the same error! The connection file was the only one reused. All new includes folder.

              ??
              Nick