trying to use firephp inside a function registered with register_shutdown_function

63 views
Skip to first unread message

Trick Rick

unread,
May 2, 2012, 6:46:10 AM5/2/12
to dev...@googlegroups.com
I have a small function that I used to get the execution time of my scripts, which I'd like to output via firephp to the console, however any calls I make to firephp from within the function registered with register_shutdown_function fail and causing the following error -  http://gyazo.com/32f5dfbe438c91b583d7319f4d8ad493

is there any way that I can log to firephp from within a function registered with register_shutdown_function() ?

Christoph Dorn

unread,
May 2, 2012, 12:45:59 PM5/2/12
to dev...@googlegroups.com
Trick Rick
2 May, 2012 3:46 AM

I have a small function that I used to get the execution time of my scripts, which I'd like to output via firephp to the console, however any calls I make to firephp from within the function registered with register_shutdown_function fail and causing the following error -  http://gyazo.com/32f5dfbe438c91b583d7319f4d8ad493

is there any way that I can log to firephp from within a function registered with register_shutdown_function() ?

Looks like you have a "<br/>" at the end of your log line for some reason. Are you printing "<br/>" anywhere?
Can you put together a little PHP test script?

Christoph

Trick Rick

unread,
May 2, 2012, 11:10:12 PM5/2/12
to dev...@googlegroups.com, chri...@christophdorn.com
no, i'm not printing a "<br/>" anywhere in the output.

But, interesting side effect. Upon trying to create a test case for you, I'm getting the same error with JUST the following script.

<?php

ob_start();
echo 'line 4';
define('FS_ROOT', 'C:\\Program Files (x86)\\Zend\\Apache2\\htdocs\\thehouseofinsurance.com\\');

// setup FirePHP output
define('INSIGHT_CONFIG_PATH', FS_ROOT.'includes/FirePHP/package.json');
require_once(FS_ROOT.'includes/FirePHP/FirePHP/Init.php');
$inspector = FirePHP::to('page');
$console = $inspector->console();

echo 'line 13';

$console->log('foo');

echo 'line 17';

?>

which makes no sense to me, since I'm not doing anything but doing a simple log.

Christoph Dorn

unread,
May 3, 2012, 11:16:04 AM5/3/12
to dev...@googlegroups.com
You just created a test case :) Thanks! Will take a look at what the issue is.

Christoph
Reply all
Reply to author
Forward
0 new messages