View Single Post
  #34  
Old 04-09-2004, 04:38 AM
RyoShin RyoShin is offline
 
Join Date: Jun 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those getting the header errors:

Go into your ftp.php file and add a double slash (//) to lines 128-132 (they start with header), 149, 150, 154, 155 (these start with cookie), and 157 (starts with header.)

Here's a better view of what to change, if you've changed how the lines are:
PHP Code:
//header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                // Headers
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0"false);
header("Pragma: no-cache"); 
And
PHP Code:
if ($cookie_username == $username && md5($cookie_password) == md5($password))    // Create cookie on login
{
 if (
$auto_login)
 {
  
setcookie("cookie_username"$usernametime()+31536000);
  
setcookie("cookie_password"md5($cookie_password), time()+31536000);
 }
 else
 {
  
setcookie("cookie_username"$username);
  
setcookie("cookie_password"md5($cookie_password));
 }
 
header("Location: $PHP_SELF");

That entire thing should change to the following (same thing, but with the double-slash (comment code)):
PHP Code:
//header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                // Headers
//header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
//header("Cache-Control: no-store, no-cache, must-revalidate");
//header("Cache-Control: post-check=0, pre-check=0", false);
//header("Pragma: no-cache"); 
And
PHP Code:
if ($cookie_username == $username && md5($cookie_password) == md5($password))    // Create cookie on login
{
 if (
$auto_login)
 {
  
//setcookie("cookie_username", $username, time()+31536000);
  //setcookie("cookie_password", md5($cookie_password), time()+31536000);
 
}
 else
 {
  
//setcookie("cookie_username", $username);
  //setcookie("cookie_password", md5($cookie_password));
 
}
 
//header("Location: $PHP_SELF");

respectively.

In fact, you might be able to comment out that entire if statement, but I'm just removing lines as they're called.

I'm no guru in PHP (working on that), but after doing that the error messages went away, and the hack still worked fine for me. I wouldn't mind seeing a fix by someone who really know it, or Erwin himself.

Oh, and I'm also having problems with making a login name work, but no clue how to fix that.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03615 seconds
  • Memory Usage 1,791KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete