lonnieezell / codeigniter-forensics Goto Github PK
View Code? Open in Web Editor NEWA high-powered, customizable Profiler replacement for CodeIgniter.
A high-powered, customizable Profiler replacement for CodeIgniter.
reading related:
In new CI3 was removed previously deprecated Routing Class <general/routing>
methods fetch_directory()
, fetch_class()
and fetch_method()
and now must be use the respective class properties instead.
now in CI3 must be:
CI_Router::fetch_class()
(use CI_Router::$class
instead)
the problem its to handle backguard compatibility with CI2 so i'm working on that
after a hard comparison between the two profiler addon for codeigniter, forensics are the better by so far! forensics handle and show many more date rether thatn others "complex addons"
if i have multi db instances in controller profiler forensics does not handle any db output, code example:
class Welcome extends CI_Controller
{
public function index()
{
$this->DB1 = $this->load->database('development', TRUE);
$this->DB2 = $this->load->database('development2', TRUE);
$this->DB1->select('*');
$result1 = $this->DB1->result();
$this->DB2->select('*');
$result2 = $this->DB2->result();
}
}
there's some way to handle multi DB instances and show the querys, i try some patches backported from CI 3 brand but no success!
conslole log not working with ajax requests
I have been getting errors when any $_GET variables are set
Severity: Notice
Message: Array to string conversion
Filename: libraries/Profiler.php
Line Number: 228
and
Severity: Warning
Message: Illegal string offset '$_GET['some_get_var']'
Filename: libraries/Profiler.php
Line Number: 235
Looking at the code it looks like $output sets itself as an array, and then tries to set it self as a string on line 228.
Forensics gives an error on line 440 of Profiler.php when a value is an object.. The following code fixes this:
if (is_object($val)) {
$output[$key] = json_encode($val);
} else {
$output[$key] = htmlspecialchars(stripslashes($val));
}
The forensics profiler doesn't show up when the CI cache is active?
Is this how it is supposed to behave?
Regards,
Maarten
How can i log db query on ajax call, $this->output->profiler(true) was displying db query on chrome developer tool when using default profiler which comes with ci.
Line 289 of profiler_template.php
<h2><?php echo lang('profiler_'. $section) ?></h2>
Needs to be replaced with
<?php $append = ($section == 'get' || $section == 'post') ? '_data' : ''; ?>
<h2><?php echo lang('profiler_'. $section . $append) ?></h2>
I added "lonnieezell/codeigniter-forensics": "dev-master" and executed "composer update".
The package has been installed but the default profiler is loaded instead.
I have "include_once './vendor/autoload.php';" in main index.php. Isn't it enough to load codeigniter-forensics classes?
README only refers using composer, etc etc online tools, if user used CI2 (i have a folk of CI2 and also a CI3 folk) there's no clear instructions and usage structure..
ill' provide a clear structure and fresh README in new pull request, later, please if some opinions and notes about it, fil here before do the pull in following dais
@lonnieezell can you draft new release, Easy to composer require with latest fixed.
I have setting all step you wrote.
I setting:
$autoload['packages'] = array(APPPATH.'third_party/codeigniter-forensics');
But it seem do not working.
I don't know why ?
Please help me.
Message: Undefined property: CI::$_ci_view_path
Filename: MX/Loader.php
Line Number: 275
Any thoughts on this?
I noticed that the queries output seemed to be missing a bunch of queries that I knew should have been there. Checking the code I found that it was being put into an array like this:
$output[$time] = $val;
If the time is the same across queries the new query will overwrite previous values. In my case this led me to have 3 instead of 10 queries in the profiler output.
I modified the code in my branch to this:
$output[][$time] = $val;
And added an extra foreach loop in the output template.
I'd do a pull request but I've made a bunch of other changes here and there that would come along with it, but let me know if you want to know exactly what changes were made to fix this or check out my fork. In my local version I've also added a total value so it displays "Total Query Execution Time" at the bottom of the query list for a quick check on total query time.
I've just started getting a really strange error that I cant pin down. The actual bar works fine, but when clicking on any of the items, I get the following error in FF console:
ci_profiler_bar is not defined
onclick()1 (line 2)
event = click clientX=1179, clientY=573
[Break On This Error] ci_profiler_bar.show("ci-profiler-console", "ci-profiler-menu-console");
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.