Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93105 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87288 invoked from network); 7 May 2016 00:18:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2016 00:18:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=wim.godden@cu.be; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=wim.godden@cu.be; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cu.be from 194.50.97.15 cause and error) X-PHP-List-Original-Sender: wim.godden@cu.be X-Host-Fingerprint: 194.50.97.15 brussels3.firstlinknetworks.com Linux 2.6 Received: from [194.50.97.15] ([194.50.97.15:37771] helo=brussels3.firstlinknetworks.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/82-53854-A343D275 for ; Fri, 06 May 2016 20:18:03 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=simple; d= brussels3.firstlinknetworks.com; h=subject:to:references:from :message-id:date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=dkim1; bh=lwW1SFJ2yDQyDs0L+kkDEY/F Gwc=; b=cMvelIwx2Yv6VechWUQ5xIGyTfmLAXiHcv6p778YZNq/Mc+9yUoDqLNj F302QyMedO8SfCxSPKZl+/pSBQVb/7RKYPy9Ghexz7G9sQGTc0MaL2K87jM9N26W R8u8dyM1eJVHhOtBqRZbRM8Sr/xvkX8bXfxK93Dl1LFope/2hh0= Received: (qmail 29859 invoked by uid 89); 7 May 2016 00:17:58 -0000 Received: from unknown (HELO ?192.168.1.190?) (wim@godden.net@192.168.1.190) by brussels3.firstlinknetworks.com with ESMTPA; 7 May 2016 00:17:58 -0000 To: internals@lists.php.net References: Organization: Cu.be Solutions Message-ID: <34286ced-d10e-beb5-b0b6-4b86947c9da3@cu.be> Date: Sat, 7 May 2016 02:18:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] How to get trace of all database queries executed by php From: wim.godden@cu.be (Wim Godden) 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