Newsgroups: php.internals,php.pear.dev Path: news.php.net Xref: news.php.net php.internals:19315 php.pear.dev:40007 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96707 invoked by uid 1010); 1 Oct 2005 15:22:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96681 invoked from network); 1 Oct 2005 15:22:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2005 15:22:11 -0000 X-Host-Fingerprint: 69.64.38.41 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from ([69.64.38.41:58620] helo=bluga.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id BB/22-54476-1A9AE334 for ; Sat, 01 Oct 2005 11:22:10 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by bluga.net (Postfix) with ESMTP id 1054121CABD; Sat, 1 Oct 2005 10:22:49 -0500 (CDT) Received: from bluga.net ([127.0.0.1]) by localhost (bluga.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01560-10; Sat, 1 Oct 2005 10:22:48 -0500 (CDT) Received: from [129.93.125.71] (pcp063014pcs.unl.edu [129.93.125.71]) by bluga.net (Postfix) with ESMTP id 7823C21CA8B; Sat, 1 Oct 2005 10:22:48 -0500 (CDT) Message-ID: <433EA995.50304@chiaraquartet.net> Date: Sat, 01 Oct 2005 08:21:57 -0700 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derick Rethans CC: pear-dev@lists.php.net, PHP Developers Mailing List References: In-Reply-To: X-Enigmail-Version: 0.92.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new using ClamAV at bluga.net Subject: Re: phar and e_strict From: greg@chiaraquartet.net (Greg Beaver) Derick Rethans wrote: > Hello! > > I am wondering why "make install-pear" comes up with hundreds of > e_strict warnings? The code tests for PHP 5.1 but makes use of all old > things that are now considered e_strict or deprecated. Besides this for > some reason setting error_reporting to 0 doesn't help at all. First of > all the code does: > > error_reporting(E_ALL);^M > if (version_compare(phpversion(), '5.1.0b1', '<')) {^M > die('Error: .phar files require PHP 5.1 or newer');^M > }^M > > But it seems E_STRICT is turned on later for some reason too. Can this > code please be upgraded to 1. not modify any error reporting setting and > 2. PHP 5.1 compatible code. Currently installing pear does not seem > to work at all with the .phar. This is a bit baffling: even a full text search of the entirety of cvs pear-core/ turns up only 1 reference to E_STRICT in the code (there are others in the in-code documentation) - and this is in a file that is not used by the .phar (pearcmd.php). A search for "error_reporting(" only turns up "error_reporting(E_ALL)." As Derick notes, this is also the first thing present in the .phar before any other code is included. It appears that E_STRICT is being triggered even though it is explicitly NOT asked for. All the same, I added another redundant error_reporting() call at the top of install-pear.php, re-built the .phar and committed to pearweb. Hopefully this will fix the issue. The code *is* PHP 5.1-compatible. Understand that the .phar uses PEAR to install things. PEAR uses things like is_a() and "var" and calling static methods because there are no alternatives unless we drop PHP 4.x support entirely from the pear command. Until all the standard unix distros (gentoo/redhat/debian/etc.) start distributing PHP 5.x as the standard PHP version, this isn't an option. I've been running the pear command using PHP 5.1rc1 ever since it came out, and it works just fine. This is a problem specific to the install-pear.phar that in fact did not happen just 2 weeks ago - perhaps something has changed in PHP 5.1 itself? Greg