HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Squirrelmail + Change_SQLPass Error: Warning: Cannot modify header information (http://www.howtoforge.com/forums/showthread.php?t=45320)

bluegrass 26th April 2010 05:26

Squirrelmail + Change_SQLPass Error: Warning: Cannot modify header information
 
Hi,

I have been looking for the answer on how to address this error. But unfortunately couldn't find any.

I have a Debian Lenny, and installed using the "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Lenny), by Falko"

It was a successful installation and configuration. But at the change_sqlpass plugin, wherein it is not included on the said tutorial, about activating the force_change_password_check_query, I activated this, and changing necessary entries:

Code:

..
$password_update_queries = array('UPDATE users SET password = %4, force_change_pwd = 0 WHERE email = "%1",)
..
$force_change_password_check_query = 'SELECT force_change_pwd FROM users WHERE email = "%1";
//$force_change_password_check_query = "";

I added the "force_change_pwd" field on the users table.

I activated this because I wanted my users to change their passwords upon login in special times.

Necessary changes are successful, but I get this error afterwhich:

Code:

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/squirrelmail/functions/page_header.php:32) in /usr/share/squirrelmail/functions/global.php on line 530

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/squirrelmail/functions/page_header.php:32) in /usr/share/squirrelmail/plugins/change_sqlpass/functions.php on line 943

Does anyone had a solution for this?

falko 27th April 2010 14:26

Can you post the full config.php of the change_sqlpass plugin? Maybe you introduced a PHP syntax error.

bluegrass 28th April 2010 08:57

Hi, Falco. Below is the config.php of the change_sqlpass plugin, I have removed the remarks lines.


Code:

<?php

  global $csp_dsn, $password_update_queries, $lookup_password_query,
          $force_change_password_check_query, $password_encryption,
          $csp_salt_query, $csp_salt_static, $csp_secure_port,
          $csp_non_standard_http_port, $csp_delimiter, $csp_debug,
          $min_password_length, $max_password_length, $include_digit_in_password,
          $include_uppercase_letter_in_password, $include_lowercase_letter_in_password,
          $include_nonalphanumeric_in_password;



  $csp_dsn = 'mysql://mail_admin:scientia@localhost/mail';



  $lookup_password_query = 'SELECT count(*) FROM users WHERE email = "%1" AND password = %4';



  $password_update_queries = array(
            'UPDATE users SET password = %4, txt_password = "%5", force_change_pwd = 0  WHERE email = "%1"',
//            'UPDATE user_flags SET force_change_pwd = 0 WHERE username = "%1"',
//            'UPDATE users SET crypt_password = %4, force_change_pwd = 0 WHERE username = "%1"',
                                  );



  $force_change_password_check_query = 'SELECT force_change_pwd FROM users WHERE email = "%1"';
  //$force_change_password_check_query = '';



  $password_encryption = 'MYSQLENCRYPT';



  $csp_salt_static = 'LEFT(password, 2)';
  $csp_secure_port = 0;
  //$csp_secure_port = 443;



  $csp_non_standard_http_port = 0;



  $min_password_length = 6;
  $max_password_length = 0;
  $include_digit_in_password = 0;
  $include_uppercase_letter_in_password = 0;
  $include_lowercase_letter_in_password = 0;
  $include_nonalphanumeric_in_password = 0;



  $csp_delimiter = '@';
 


  $csp_debug = 0;



?>


falko 30th April 2010 13:17

As fas as I can see, there's no PHP syntax error. I guess the problem has something to do with $force_change_password_check_query, but I'm not sure... :confused:


All times are GMT +2. The time now is 02:44.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.