Welcome to Geeklog, Anonymous Monday, January 30 2023 @ 09:43 am EST

Geeklog Forums

phpmychat plugin complains "Cannot modify header information"


Status: offline

Frlitz

Forum User
Junior
Registered: 01/28/04
Posts: 15
I have shell access to two machines with Geeklog v. 1.3.11, fc3, apache, mysql, and php installed. The plugin phpmychat installed successfully on both machines, but, it complaints with the "Cannot modify header information" on the second machine when accessing a chatroom (the full complaint is below). I have duplicated the working machine's entire public_html structure onto the complainting machine with no change.

Although the OS configuration and geeklog installation on both machines are identical in many ways there is obviously a difference between the two environments that I can not find. For instance, on the complaining machine, I had to modify the professional theme header as suggested in an earlier post by removing the first line in header.thtml to stop the same complaint for another plugin.

I have been troubleshooting this complaint for several days, in addition to performing several clean installs, and I am now clueless as to what I need to do next. The full complaint is below.

Text Formatted Code

Complaint:
Notice: Undefined variable: PASSWORD in /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3 on line 259
 
Notice: Undefined variable: PASSWORD in /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3 on line 265
 
Warning: Cannot modify header information - headers already sent by (output started
 at /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3:259)
 in /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3 on line 281
 
Warning: Cannot modify header information - headers already sent by (output started
 at /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3:259)
 in /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3 on line 457
 
Warning: Cannot modify header information - headers already sent by (output started
 at /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3:259)
 in /var/www/html/public_html/phpmychat/mychat/chat/lib/index.lib.php3 on line 458

 


Text Formatted Code

index.lib.php3 at line 254:
  if (!(isset($E) && $E != ""))
                        {
                                // Check for password if the nick exist in registered users table
                                if ($reguser)
                                {
                                        if ($PASSWORD == "" && !isset($PWD_Hash))
                                        {
                                                $Error = L_ERR_USR_3;
                                        }
                                        else
                                        {
                                                if (md5(stripslashes($PASSWORD)) != $user_passw
ord && (!isset($PWD_Hash) || $PWD_Hash != $user_password)) $Error = L_ERR_USR_4;
                                        }
                                        if (!isset($Error)) $DbLink->query("UPDATE ".C_REG_TBL.
" SET reg_time=".time()." WHERE username='$U'");
                                }
                                // If users isn't a registered one and phpMyChat require registration deny access
                                else if (C_REQUIRE_REGISTER)
                                {
                                        $Error = L_ERR_USR_14;
                                }
                        }
at 281:
setcookie("CookieUsername", $CookieUsername, time() + 60*60*24*365);
at 457:
setcookie("CookieRoom", $CookieRoom, time() + 60*60*24*365);
at 458:
setcookie("CookieRoomType", $T, time() + 60*60*24*365);

 


Update: Between the time I began writing this messages and just before posting, I found a discussion with the same complaint that recommends a change:

Text Formatted Code

php.ini
output_buffering=on;

 


I made the change in php.ini and restarted the httpd server and "poof" the complaints about the headers were gone! I am not really sure whether this change will backfire later.

Unfortunately, the complaint about PASSWORD remains.

Frlitz
 Quote

All times are EST. The time is now 09:43 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content