#30326 [Opn->Fbk]: "zip_open" cannot open file

From: Date: Sun, 28 Nov 2004 12:54:57 +0000
Subject: #30326 [Opn->Fbk]: "zip_open" cannot open file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69549@lists.php.net to get a copy of this message
ID: 30326 Updated by: tony2001@php.net Reported By: adamsbarker at hotmail dot com -Status: Open +Status: Feedback Bug Type: ZZiplib Related Operating System: Windows XP PHP Version: 5.0.2 New Comment: Please, check that your web-server has all necessary NTFS permissions to read this file. Previous Comments: ------------------------------------------------------------------------ [2004-10-07 01:13:16] adamsbarker at hotmail dot com This is how i've done it: - my home directory is "D:\home" - both "open_zip.php" AND "abc.zip" are in "D:\home" - zip_open('D:\home\abc.zip'); - this works perfectly - zip_open('abc.zip'); - has this error: Warning: zip_open() [function.zip-open]: Cannot open zip archive abc.zip in D:\home\open_zip.php on line 3 - echo getcwd(); => produces this: D:\home i hope this makes sense :) ------------------------------------------------------------------------ [2004-10-06 11:22:00] derick@php.net it probably means that the working directory is different then you think it is. What does echo getcwd(); output? ------------------------------------------------------------------------ [2004-10-06 11:19:50] adamsbarker at hotmail dot com yes, both the "php" and "zip" files are in the same directory... i completely removed php and got copies of the latest stable version/PECL extensions for Windows, but still the same problem... this problem seems to be running throughout the versions, since i first noticed it a couple of months ago. ------------------------------------------------------------------------ [2004-10-06 01:17:29] iliaa@php.net Is the script being ran from the same directory as the one where the zip file is? ------------------------------------------------------------------------ [2004-10-05 02:45:02] adamsbarker at hotmail dot com Description: ------------ when using the following code: zip_open('file_name.zip'); i get the following error: ---------------- Warning: zip_open() [function.zip-open]: Cannot open zip archive file_name.zip in C:\test.php on line 1 ---------------- the "zip file" and "php script" are in the same directory when i put in the full directory of the zip file, such as "C:\file_name.zip", the file is opened and everything works as expected. i don't think this should be how it works as all other functions (ie, include()) don't need the full directory! i am using the latest stable version 5.0.3-dev and PECL extensions ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30326&edit=1

« previous php.bugs (#69549) next »