Re: How to get trace of all database queries executed by php

From: Date: Sat, 07 May 2016 00:18:04 +0000
Subject: Re: How to get trace of all database queries executed by php
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-93105@lists.php.net to get a copy of this message
On 7/05/2016 1:34, Raja Kulasekaran wrote:
I have encrypted php Application codebase which I may or may not have access. So, I would like to know how the application behaving / profiling Database queries through the .so or .dll level . Is there any php extension available which help me out to give the statistics of all the queries execution details ?
Most DB servers will allow you to do this directly or indirectly. If you're using MySQL, there's a few options : - General query log (don't do this on a busy production server since it will produce massive log files and the I/O alone could bring down your server) : http://dev.mysql.com/doc/refman/5.7/en/query-log.html - MySQLProxy : http://philippeback.be/2013/02/logging-mysql-queries-with-mysqlproxy/ For Postgres : http://www.microhowto.info/howto/log_all_queries_to_a_postgresql_server.html Kind regards, Wim

« previous php.internals (#93105) next »