From owner-freebsd-questions@FreeBSD.ORG Wed Feb 14 23:40:42 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1596E16A402 for ; Wed, 14 Feb 2007 23:40:42 +0000 (UTC) (envelope-from peter@placidpublishing.net) Received: from mail.placidpublishing.net (placidpublishing.net [72.232.50.130]) by mx1.freebsd.org (Postfix) with ESMTP id E7A6F13C49D for ; Wed, 14 Feb 2007 23:40:41 +0000 (UTC) (envelope-from peter@placidpublishing.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.placidpublishing.net (Postfix) with ESMTP id C6FEF50817 for ; Wed, 14 Feb 2007 17:47:13 -0600 (CST) Received: from mail.placidpublishing.net ([127.0.0.1]) by localhost (mail.placidpublishing.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22734-07 for ; Wed, 14 Feb 2007 17:47:10 -0600 (CST) Received: from [192.168.1.20] (c-67-175-92-171.hsd1.il.comcast.net [67.175.92.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.placidpublishing.net (Postfix) with ESMTP id B3FF65080B for ; Wed, 14 Feb 2007 17:47:10 -0600 (CST) Message-ID: <45D39E09.9010204@placidpublishing.net> Date: Wed, 14 Feb 2007 17:40:57 -0600 From: Peter Pluta Organization: Placid Publishing, LLC User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard Subject: RE: Very Annoying PHP Errors X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: peter@placidpublishing.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2007 23:40:42 -0000 I couldn't get error logging to work correctly - I had error_reporting commented out, and display_errors = On I also added error_reporting(E_ALL); to my header file and the page was just blank... What I did was downgraded the php port to 5.2.0 and just re-compiled php and all of it's extensions to 5.2.0. The end result was magical my site began to work and all the annoying errors disappeared. I believe 5.2.1 is buggy - reading the Sushion forums many people are complaining about certain db connection issues and the ALERT - canary mismatch on efree() - heap overflow detected error. I will stick to 5.2.0 for now and upgrade when they fix the darn bugs. I'm using FreeBSD 6.1 with Apache 2.2.4 and PHP 5.2.0 with Sushion, ipv6 support, and Apache support. Kevin Kinsey wrote: > Peter Pluta wrote: >> I recently upgraded to 5.2.1_1. After upgrading (or before not >> exactly sure) I began getting errors ALERT - canary mismatch on >> efree() - heap overflow detected in my Apache logs. > > That sounds a tad troubling, and is rather over my head. It does > appear that some people believe that recent changes in the Zend Memory > Manager have been a tad, err, hasty|ill-advised|to be sneered at. > > Like I say, way over my head. Considering 5.2.1 was released six days > ago, you may have found a new bug! Congratulations!?? > >> Also, certain parts of one of my database (mysql) driven sites >> stopped working. Certain pages just stopped working, they return a >> blank white page. > > This is indicative of a PHP "stop" error, with PHP's error_reporting > directive set to "off". You might try adjusting the value of the > display_errors directive in php.ini to "ON" (and restarting apache), > or, on a page-by-page basis (or in a header file if the PHP site using > such things), adding the line: > > error_reporting(E_ALL); > > to the top of each affected file. PHP will most likely tell you > what the error is from its POV, which might well help you decide what > course of action to take. For more info, see: > > www.php.net/error_reporting > > Of course, it's possible that you'll simply get the same error - only > now it's displayed on the page instead of the Apache log. Perhaps it > will give a line number or tell what PHP call produced the error ... > might help a little bit. > >> I'm absolutely stumped on what it could be. I have tried recompiling >> php 4-5x with different options and re-installing apache etc... >> Nothing is working. I looked for php bug reports, and found this one >> http://bugs.php.net/bug.php?id=40119 but it does not really pertain >> to me. Can anyone give some pointers or tips on what to do? >> > > Take a deep breath and a cup of {beverage}; chances are pretty good > that you will find out what's wrong. Sounds like, according to your > description above, some problem with the MySQL extension to PHP, or > PHP's loading of said extension, or the order in which things were > compiled, or the options in "extensions.ini", etc. > > Oh, and see above ;-) > > Of course, if it's a real live PHP bug, it won't be quite as easy as > changing an .ini file..... > >> Right now I am thinking of just downgrading to PHP 5.2.0 because >> that's what worked last. Is there an easy way to downgrade ports? >> > > I'd not go there just yet; but, it's possible to use cvsup to get an > older version of the ports tree, yes. What kind of a mess you might > get into as a result, I'm not sure. It might be possible to uninstall > all the affected ports and grab packages that were built by the FBSD > team for 6.2-RELEASE; they would likely work, although you'll be > using an older PHP as a result; that's what's maddening about > attempting to stay ahead of the "bad guyz" these days. PHP 5.2.1, for > example, is supposed to *fix* some potential security problems . . . > not cause DOS. > > >> Any feedback, tips, or help would be greatly appreciated. >> >> Thanks, >> Peter > > Hopefully it's worth something. > > Kevin D. Kinsey My php installations have also several and repeating errors, but its difficult to analyze, because they keep changing. While updating ports using portmanager or portmaster sometimes installation of databases/php5-mysql or databases/php5-mysqli fails or sometimes both but also sometimes both install without errors. When errors occur, it has to do with missing mysql-client libraries, a mysql-client port-installation is attempted and fails because mysql-client is in fact already installed. By manually deinstalling and reinstalling mysql-client port just before the php-mysql port and php-mysqli port installation works, but maybe the next days already same errors occur. Sometimes all ports installe correctly but afterwards php fails to load an installed extension (error message refers to missing functions). This happened once with mysqli-extension, but not mysql and once with sqlite-extension. Some others too, but I don't recall which ones. Usually deinstalling and reinstalling the affected extension fixes it. But there again, I may get the difficulties mentioned above. So in summary, as a non programming observator, i think somehow libraries which where successfully installed get lost at some point on my systems.