Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirePHP shows always FirePHP.class.php instead of actual file #24

Closed
ErikKrause opened this issue Nov 10, 2017 · 5 comments
Closed

FirePHP shows always FirePHP.class.php instead of actual file #24

ErikKrause opened this issue Nov 10, 2017 · 5 comments

Comments

@ErikKrause
Copy link

If I expand an entry clicking the + button in the top riht corner of the entry there is a file name and line number shown. I assume this should be the name and line where the message was logged. However, it is always the same line and file. This happens on my local page but not on firephp.org. Do I have the wrong server version? This version used to work in firebug.
zwischenablage03

@cadorn
Copy link
Member

cadorn commented Nov 11, 2017

If I recall correctly this can happen if you do not call the FirePHP methods directly. You may need to patch the FirePHPCore class to exclude more paths. I have plans to expand the API in FirePHPCore to make that easier in time.

@ErikKrause
Copy link
Author

I do the following to initialize:

require_once($include_dir."FirePHP.class.php");
$firephp = FirePhp::getInstance(true);
$firephp->setEnabled(true);

and later I do f.e.:

$firephp->log($GeoCountry, '$GeoCountry -ci');
$firephp->log($_GET, '$_GET -ci');

The calls in this project haven't changed for ages and they worked well in Firebug. I also tried various versions of FirePHP.class.php to no avail.

@cadorn
Copy link
Member

cadorn commented Nov 12, 2017

Hmm, not sure. The path is provided by the server so you will see it in the HTTP response headers.

You can try the path filter feature when it becomes available: firephp/firephp-core#41

@ErikKrause
Copy link
Author

You are right, the wrong path was in the HTTP headers. I changed the line
|| substr($this->_standardizePath($trace[$i]['file']),-29,29)=='FirePHPCore/FirePHP.class.php')) {
to
|| substr($this->_standardizePath($trace[$i]['file']), -17, 17) == 'FirePHP.class.php')) {
in FirePHP.class.php (since I don't have it in a folder named FirePHPCore). Now it works.

The strange thing is: The line with FirePHPCore in it is in all older versions of that file I have used starting with v0.3 in at least 20 projects and all of them worked with firebug. The only thing I changed since I stopped using firebug was the PHP version (from 5.2 to 5.6). Could that be the reason?

@cadorn
Copy link
Member

cadorn commented Nov 12, 2017

No idea. I'll check into all this when I look at FirePHPCore.

Continued here: firephp/firephp-core#41

@cadorn cadorn closed this as completed Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants