go-pear problem
| From: | Andrea Brancatelli | Date: | Mon, 04 Nov 2002 18:47:46 +0000 |
| Subject: | go-pear problem | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2601@lists.php.net to get a copy of this message | ||
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? ;)
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
--
Saluti, mailto:andrea@brancatelli.it
Andrea Brancatelli http://andrea.brancatelli.it/
(Per usare internet al meglio... http://www.nic.it/NA/netiquette.txt)