Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #5073 cache fatal error if no cached content
Submitted: 2005-08-12 03:27 UTC
From: toggg Assigned: cellog
Status: Closed Package: PEAR
PHP Version: 4.3.11 OS: FC3
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-12 03:27 UTC] toggg
Description: ------------ After upgrading to cvs and removing XML_RPC, list-upgrades or remote-list crash at the beginning just after getting REST information. Note: I have still the patch about cacheid writing bug, so that's not caused by this one # pear -V PEAR Version: 1.4.0a13 PHP Version: 4.3.11 Zend Engine Version: 1.3.0 Running on: Linux ancilla.toggg.net 2.6.12-1.1372_FC3smp #1 SMP Fri Jul 15 01:30:03 EDT 2005 i686 # pear upgrade -f package2.xml upgrade ok: channel://pear.php.net/PEAR-1.4.0a13 PEAR: Optional feature remoteinstall available (adds the ability to install packages to a remote ftp server) PEAR: Optional feature webinstaller available (PEAR's web-based installer) PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer) To install use "pear install PEAR#featurename" # pear uninstall xml_rpc uninstall ok: channel://pear.php.net/XML_RPC-1.3.3 # pear list-upgrades Notice: Array to string conversion in PEAR/REST/10.php on line 447 Segmentation fault # pear clear-cache reading directory /tmp/pear/cache 447 cache entries cleared # pear list-upgrades Notice: Array to string conversion in PEAR/REST/10.php on line 424 Channel pear.php.net: No upgrades available (wrong, there is some ...) # pear remote-list Notice: Array to string conversion in PEAR/REST/10.php on line 294 (no packages available yet) *** glibc detected *** free(): invalid next size (fast): 0x0956ed90 *** Aborted # ll /tmp/pear/cache/ total 8 -rw-r--r-- 1 root root 8 Aug 12 05:15 6d1f6e892384ae452db9a1bd59ee95f5rest.cachefile -rw-r--r-- 1 root root 55 Aug 12 05:15 6d1f6e892384ae452db9a1bd59ee95f5rest.cacheid

Comments

 [2005-08-12 15:15 UTC] toggg
I've been trying: # PHP_PEAR_PHP_BIN=/home/bertrand/php/php4-STABLE-200508121241/sapi/cli/php # export PHP_PEAR_PHP_BIN # pear list-upgrades <silent....> # pear remote-list Notice: Array to string conversion in 10.php on line 294 Warning: Invalid argument supplied for foreach() in 10.php on line 296 (no packages available yet) *** glibc detected *** free(): invalid next size (fast): 0x08b5a458 *** Aborted <same with cgi> # PHP_PEAR_PHP_BIN=/home/bertrand/php/php5-200508121230/sapi/cli/php # export PHP_PEAR_PHP_BIN # pear list-upgrades <silent....> # pear remote-list Notice: Array to string conversion in 10.php on line 294 Warning: Invalid argument supplied for foreach() in 10.php on line 296 (no packages available yet) <same with cgi> What is somehow surprising is: if I reset to FC3 php 4.3.11: # pear list-upgrades Notice: Array to string conversion in PEAR/REST/10.php on line 424 Channel pear.php.net: No upgrades available # pear remote-list Notice: Array to string conversion in PEAR/REST/10.php on line 294 (no packages available yet) Segmentation fault line 294: $packagelist['p'] = array($packagelist['p']); line 424: $packagelist['p'] = array($packagelist['p']); 1) I don't see the relation between the error message and the line 2) All 4.3, 4.4, 5.1 versions get problems on 294 3) Only 4.3 gets some one 424, but the lines contents are same !! Again, the most terrific is the silence by list-upgrades for 4.4 and 5.1. I don't exclude something is wrong in my install, but what ?
 [2005-08-13 11:41 UTC] toggg
This bug was introduced by last update. In case no cacheid is found $cacheId is false, so $cacheId['lastChange'] is null what makes downloadHttp() returning a string and not an array... Why does that output no warning ? Are they disabled ? If yes, that's very bad for an alpha... Anyway, here the diff: $ diff -bu REST.phpcrash REST.php --- REST.phpcrash 2005-08-13 13:35:38.000000000 +0200 +++ REST.php 2005-08-13 13:36:40.000000000 +0200 @@ -85,7 +85,7 @@ } if (!isset($this->_options['offline'])) { $trieddownload = true; - $file = $this->downloadHttp($url, $cacheId['lastChange'], $accept);+ $file = $this->downloadHttp($url, $cacheId ? $cacheId['lastChange']: $cacheId, $accept); } else { $trieddownload = false; $file = false;
 [2005-08-13 22:25 UTC] cellog
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.