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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php