Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6684 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3845 invoked by uid 1010); 23 Dec 2003 01:28:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3821 invoked from network); 23 Dec 2003 01:28:12 -0000 Received: from unknown (HELO sunshine.home) (62.178.227.34) by pb1.pair.com with SMTP; 23 Dec 2003 01:28:12 -0000 Received: from mfischer by sunshine.home with local (Exim 4.22) id 1AYayY-0004Xh-4W for internals@lists.php.net; Tue, 23 Dec 2003 02:04:42 +0100 Date: Tue, 23 Dec 2003 02:04:42 +0100 To: internals@lists.php.net Message-ID: <20031223010441.GA17440@gjat.josefine.at> Mail-Followup-To: Markus Fischer , internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: Vim http://www.vim.org/ X-PGP-Key: 0xC2272BD0 at wwwkeys.eu.pgp.net X-PGP-Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 User-Agent: Microsoft Outlook Express 5.50.4807.1700.314 X-Spamfilter: Fighting it with http://www.spamassassin.org/ and http://razor.sourceforge.net/ Subject: Problem reading exception stack (using 5b3) From: mfischer@gjat.josefine.at (Markus Fischer) From my current tests I get the following stack: [23-Dec-2003 01:55:10] PHP Fatal error: Uncaught exception 'exception' with message 'Unable to connect to database; mysql_error = Unknown MySQL Server Host 'bla' (4)' in /home/mfischer/php/System.php:12 Stack trace: #0 /home/mfischer/php/Database/MySQL.php(30): mysql->mysql_connect('bla', '', '') #1 /home/mfischer/htdocs/php5/test.php(5): mysql->connect('hostname=bla') #2 {main} thrown in /home/mfischer/php/System.php on line 12 However, the code flow is as the following: 1) /home/mfischer/htdocs/php5/test.php(5): $db->connect("hostname=bla"); 'connect' method of object '$db' is called; not of object '$mysql' (only the class is called mysql) 2) /home/mfischer/php/Database/MySQL.php(30): $this->resource = System::mysql_connect($this->hostname, $this->username, $this->password); The static method 'mysql_connect' of the 'System' class is called (and not mysql->mysql_connect); 3) /home/mfischer/php/System.php(12): throw new Exception("Unable to connect to database$mysql_error"); So, for me it seems that a) the order of the stack is not right (0->1->2 should be 1->0->2) b) the called function on the stack doesn't reassemble the real names. In #1 it should be $db->connect and in #0 it should be System::mysql_connect; Any ideas about this? - Markus