Bug #54128 [Asn->Opn]: ZIP_ER_OPEN when ZipArchive::open() on temp file

From: Date: Tue, 24 Oct 2017 07:33:52 +0000
Subject: Bug #54128 [Asn->Opn]: ZIP_ER_OPEN when ZipArchive::open() on temp file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212107@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54128&edit=1

 ID:                 54128
 Updated by:         kalle@php.net
 Reported by:        vavra at 602 dot cz
 Summary:            ZIP_ER_OPEN when ZipArchive::open() on temp file
-Status:             Assigned
+Status:             Open
 Type:               Bug
 Package:            Zip Related
 Operating System:   Windows 2003
 PHP Version:        5.3.5
-Assigned To:        pajoye
+Assigned To:        
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2011-03-02 23:33:28] pajoye@php.net

This problem is new to me and again, there are reasons why we use it.

In any case, thanks for the feedback, the problem is identified and has sufficient 
info. I will try to figure a portable way to make this special case working.

------------------------------------------------------------------------
[2011-03-02 19:53:19] carsten_sttgt at gmx dot de

hmmm,
> We also have to test if the file exists,

man 2 access
   access, eaccess, faccessat -- check accessibility of a file

man 2 stat
   stat, lstat, fstat, fstatat -- get file status

I think access is the winner (especially if there is a known problem with stat)

------------------------------------------------------------------------
[2011-03-02 19:37:52] pajoye@php.net

No, stat exists for that.

------------------------------------------------------------------------
[2011-03-02 19:31:39] carsten_sttgt at gmx dot de

> thus stat should normally work in this folder for own files.

Ups, must correct me. stat (crt) is really not working, even "traverse folder/execute
file" is allowed.


But I must agree with vavra. Checking the existence of a file is normally done with (f)open or
access. Someone should report this to the libzip team.

------------------------------------------------------------------------
[2011-03-02 16:56:15] pajoye@php.net

@carsten_sttgt at gmx dot de
Can you please for my own sanity keep separate issues separated? Thanks.

The stat problem here is totally unrelated to realpath_r. There is a reason why 
we do it (see my other comment) and I already said that I have to see what else 
we can do to work around this problem without adding more platform specific 
changes in this implementation.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=54128


--
Edit this bug report at https://bugs.php.net/bug.php?id=54128&edit=1


Thread (16 messages)

« previous php.bugs (#212107) next »