Open Geethikamanat opened 7 years ago
Are you sure you are calling $debugbar->sendDataInHeaders(true);
at the end of the script, just before echoing any output? I've fall in that little pit a few moments ago, I feel the name or the behavour of that function confusing (and not documented).
Hello, I have a legacy project (PHP 5) that uses Kohana v2 and would like to know how can I log the SQL? Could help? Thanks
i also have custom php framework which is made by procedural php mainly. I added PHP DebugBar, except database it works. For Database tab, I did custom mysqli collector, although it does not procude error, it does not work. Can you make an official example for mysqli integration @maximebf ? I have tried to catch queries with "$this->mysqli->query("SHOW FULL PROCESSLIST");"
I did custom mysqli collector, although it does not procude error, it does not work
@ihlassovbetov hi, share your progress and maybe we can review why it is not working for you, an official PR could be made
Also, ideas https://github.com/maximebf/php-debugbar/issues/517#issuecomment-1724366970, https://github.com/maximebf/php-debugbar/issues/213, Collectors/DatabaseMySqliQueryCollector.php#L58 DataCollector/MysqlCollector.php#L37
i am using mysqli not pdo, how to integrate this with mysqli? i am saving queries in function function dbquery($sql) {
return $result; }
and added a mysql collector call collector using
but it doesnt includes ajax queries. for ajax requests i set $debugbar->sendDataInHeaders(true); but it doesnt works collector
namespace DebugBar\Bridge; use DebugBar\DataCollector\AssetProvider; use DebugBar\DataCollector\DataCollector; use DebugBar\DataCollector\Renderable; use DebugBar\DebugBarException;
class mysqlCollector extends DataCollector implements Renderable, AssetProvider { protected $mysql_queries;
}