Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30150 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35995 invoked by uid 1010); 13 Jun 2007 10:31:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35980 invoked from network); 13 Jun 2007 10:31:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jun 2007 10:31:41 -0000 Authentication-Results: pb1.pair.com header.from=markus@fischer.name; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=markus@fischer.name; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fischer.name from 213.46.255.22 cause and error) X-PHP-List-Original-Sender: markus@fischer.name X-Host-Fingerprint: 213.46.255.22 viefep18-int.chello.at Solaris 10 (beta) Received: from [213.46.255.22] ([213.46.255.22:48751] helo=viefep16-int.chello.at) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/04-26103-987CF664 for ; Wed, 13 Jun 2007 06:31:39 -0400 Received: from genuine ([213.47.89.232]) by viefep16-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070613103132.OQZA24784.viefep16-int.chello.at@genuine>; Wed, 13 Jun 2007 12:31:32 +0200 Received: from mail.netcare.at ([213.164.23.137] helo=[10.15.10.15]) by genuine with esmtpa (Exim 4.50) id 1HyPzp-0000Mj-K9; Wed, 13 Jun 2007 12:22:39 +0200 Message-ID: <466FC781.3010601@fischer.name> Date: Wed, 13 Jun 2007 12:31:29 +0200 User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Alexey Zakhlestin , stefan.priebsch@e-novative.de CC: internals@lists.php.net References: <466F9623.3050102@fischer.name> In-Reply-To: X-Enigmail-Version: 0.95.1 OpenPGP: id=C2272BD0; url=http://markus.fischer.name/my_public_key.txt Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0 X-Spam-Level: / X-Spam-Report: Spam detection software, running on the system "genuine", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Alexey, Stefan, first thanks for the replies! [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- Subject: Re: [PHP-DEV] [PHP4] Logging native PHP function calls From: markus@fischer.name (Markus Fischer) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Alexey, Stefan, first thanks for the replies! Actually I'm in general aware of xdebug, however I didn't know it met my criteria. The thing is: I need to know specific information of the mysql operations: 1) host,user,pass of connects/pconnects (and which type of connect), count of connects this very request already had 2) sql statement on query, execution time, count of how many statements this very request already had Additional to that I need information like: * server ip (multiple servers) * remote ip * http host (zillions of vhosts) * uri * user agent string This is what we currently log for debugging, but we're unable to fully coverage all sources. As can be seen, my idea was to have a single place where to log things from all servers/vhosts/applications, because they also make use of the single mysql.so driver. Is this possible with xdebug in this manner? With my current information I really need this information and to my knowledge (falsely?) I can't this out of xdebug. Probably important to note, I've been using xdebug in the past, profiling things, but I don't see this possible in production environment running and getting out the the information I need. thank you, - - Markus Alexey Zakhlestin wrote: > http://xdebug.org/ > > On 6/13/07, Markus Fischer wrote: > Hi, > > I've this very very special problems and would ask for some hints, any > helpful response is very appreciated :) > > The usual story: old system, big, clunky, legacy, PHP4, can't upgrade. > > We're having serious problems with MySQL and too many connections and so > on, but we can't find out where the problematic cases are. We've gone > already through lengthy auditing and logging sessions without real > success. > > So my next idea: I go into the PHP source, in my case specifically into > ext/mysql/php_mysql.c, reactive my old C skills and inject the logging > of connects and queries directly into the source. Because, as ironic as > it sounds, with the HUGE amount of code we have we still were not able > to identify all places where mysql_(p)connect/mysql_query is used, > because of using variable variables and other nice [tm] tricks. > > I understand my attempt is brute force and I'm pretty alone out there. > > So, actually I would start hacking away this very moment. But, if anyone > has other suggestion how to go for this, it would be very very much > appreciated. > > thanks for reading, > - Markus >> - -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php >> >> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGb8eB1nS0RcInK9ARAoi7AJ0THIJ3VH/43Glq7VuxgpFPqlKieQCdHc8/ VLK3Jox+9AfcNzN4bLf/n7E= =VYuh -----END PGP SIGNATURE-----