0

I've had a SMTP process/function loaded in a global directory - has been working for years.. Today it suddenly stopped. I've been through my code & the smtp is being called by my subdomains. However Nothing is being recorded/logged. Im gtting no SMTP emails (passwords).

In my subdomain, i have a registered function.

register_shutdown_function('shutdown'); in this shutdown routine I call a backtrace.

ob_start();
var_dump(debug_backtrace());
$text.= ob_get_clean();

This is saved to a file on my server & logs correctly.

The problem is that the ONLY function the backtrace shows is my shutdown function.

Is there a way to trace / log the progress of ALL and any functions that the programme has used or is trying to use ?

Ps i have logs of my logging procedures & logs showing that i'm logging stuff... i have more logs logging things than actual programme - trying to debug things...

G Stewpot
  • 97
  • 1
  • 2
  • 10
  • Ive also used - debug_print_backtrace(); - Only function being shown is the shutdown function – G Stewpot Mar 25 '17 at 01:39
  • Talking about a bad design, oh well. In PHP you can rename every internal function but it requires a module named runkit. Rename the function, create your own function calling the 'renamed' native function. Now log in that function it has been called. You can even do so by using magic constants like `__FILE__`, `__LINE__` and `__FUNCTION__`. So yes, it is possible. – Xorifelse Mar 25 '17 at 01:52
  • Did you check the error logs? – user2182349 Mar 25 '17 at 02:07

1 Answers1

0

I have figured out my problem, Fixing... (although i would still like to know a reliable bugtrace...

Basically i was on the 'login' screen. But my session values told me i was already logged in.. & bounced me back to the main part of the script BEFORE sending out my password email.

of course, my main part of the script saw my URL as the login screen, so it showed me that screen. (endless loop).

adding a part now to bounce the URL back to the main screen if i am already logged in...

G Stewpot
  • 97
  • 1
  • 2
  • 10