Re: go-pear problem

From: Date: Wed, 06 Nov 2002 14:27:08 +0000
Subject: Re: go-pear problem
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2637@lists.php.net to get a copy of this message
On Mon, 2002-11-04 at 19:47, Andrea Brancatelli wrote: > Hello pear-general, > > There's a problem with go-pear. > > Inside the function download_url() the function to open the .TGZ for > writing uses > > $wp = fopen($destfile, "w"); > > that is not binary-safe and corrupts the .TGZ converting every \n in > \r\n (or \n\r, whatever). > > This causes go-pear not to work on OS/2 (for example) and maybe > under Windows too, and it's also clashing with PHP manual that > reads: > > "Note: The mode may contain the letter 'b'. This is useful only on > systems which differentiate between binary and text files (i.e. > Windows. It's useless on Unix). If not needed, this will be ignored. > You are encouraged to include the 'b' flag in order to make your > scripts more portable." > > http://www.php.net/manual/en/function.fopen.php > > Can you fix this? ;) Fixed in CVS, will appear on go-pear.org within an hour. > Furthermore I'm having problems with the installer.php and > command/install.php functions, but I yet have to investigate this. > > No packages can be installed because every loop of the (foreach > $install...) the $tmp dir crawls up one level (god knows why) so the > temporary dir for the first loop is /tmp/tmp[something) then it > becames ./tmp[something] then go-pear dies because he can't create > the directory (the variable is empty). I tried some digging in the > code, but I not having ever read PEAR 'till now it's a pretty hard > thing, also because those .PHP files get downloaded every run, so I > also have hard times in editing them. > > Any hint on that? > > Thanks. > > Tested environment: > > PHP 4.1.2 and PHP 4.2.3 > OS/2 Warp Server for eBusiness It's been a while since I saw a machine running OS/2, but if you could provide some more details (such as what line numbers you think the tmpdir changes the wrong way etc) I can try taking a look at it. - Stig -- Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway http://pear.php.net/wishlist.php/ssb

« previous php.pear.general (#2637) next »