vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Blank screen after calling my hook (https://vborg.vbsupport.ru/showthread.php?t=180521)

resurepus 05-26-2008 05:42 AM

Blank screen after calling my hook
 
I try to write a hook for "reset_password" event. Hook code looks simply:
Code:

global $newpassword;
$fp = fopen("reset_password.txt", "w");
fputs($fp, $newpassword);
fclose($fp);

But when it is active and has been called (e.g., when user follows a link in his email when he losts password), I'v got a blank screen instead of standard "password reseted" message. vBulletin is not crashes at all, it continues work after calling hook, for example, sends an email with new password to user. When I remove all file operations (just leave string "$x = $newpassword") the forum works properly.
The site has been installed on my local computer (Windows XP, Apache 1.x, PHP 5, MySQL 5), I have administrator rights (all filesystem operations are accessible).

What is the matter? If the code above generates some error, how can I view it?

Dismounted 05-26-2008 05:56 AM

Look in your error log file.

resurepus 05-26-2008 07:53 AM

Error.log is clear. I forgot to say: reset_password.txt has been created, $newpassword contains right new password and also has been written to the file.
More information: when I've disabled "GZip output" option, all becomes fine (I see the resulting page), but nothing additional information has appeared. How output type depends on non-visual results of code execution?


All times are GMT. The time now is 02:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01011 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete