bug in PHP copy() causes failure

From: Date: Sat, 15 Feb 2003 20:02:38 +0000
Subject: bug in PHP copy() causes failure
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13343@lists.php.net to get a copy of this message
I just opened a new bug, copy('file','dest') returns false on windows if the source file has 0 length. I just fixed this and was able to get phpDocumentor to install properly on windows. The next release will not have the offending 0-length file, which will solve that problem. I was wrong about role="script", found code just a few minutes ago that handles it. Someone should also add all the other attributes the installer handles like install-as to the DTD for package.xml Greg "Greg Beaver" <greg@chiaraquartet.net> wrote in message news:20030215052226.24747.qmail@pb1.pair.com... > Hi all, > > I've isolated one problem in phpDocumentor installation woes to the use of > the php copy() command. Apparently, when a 0-length file is copied, copy() > returns failure on windows! The stylesheet.css file in the default HTML > converter has 0 length (the default converter is deprecated, so I am > removing it entirely from the next pear release). So, this makes it fail. > > No idea why pear upgrade doesn't work. > > the failure to install phpdoc as role="script" is due to the fact that the > pear installer has absolutely no understanding of role="script"!!! Contrary > to advice I've been given, role="script" has no handling anywhere in > PEAR_Config, nor is it recognized, so I've changed the role of phpdoc to php > and now it will install. This will only affect the next release, of > 1.2.0rc1. > > I kludged the code in PEAR/Installer.php so that instead of using > System::mktemp('-d') it used System::mkDir(System::tmpdir().'\\test') and > this allowed me to inspect the output from Archive_Tar. The good news is > that every file is there, in perfect condition as packaged. Archive_Tar is > indeed at 1.0 :). I also closely inspected the generated package.xml, and > every file is accounted for properly with no errors in names or anything > like that. The bug that is preventing phpDocumentor install is in the code > that extracts each file individually, or in the code that parses the > package.xml and compares it to the extracted files. > > Extracted file > /tmp/tmpeYpahs/PhpDocumentor-1.2.0beta3/phpDocumentor/Converters/HTML/frames > /templates/DOM/default/templates/media/ does not have the correct file size > '' (54 expected). Archive may be corrupted. > > This error message from Arnaud is confusing to me - the error message > clearly states that the extracted "file" is not a file, but a directory > (note the trailing "/"). I wonder what that is all about. Is this a faulty > error, or is PEAR trying to say that the directory should have a file size? > > Greg > -- > phpDocumentor > http://www.phpdoc.org > >

« previous php.pear.dev (#13343) next »