From:             black-cod3 at live dot com
Operating system: linux
PHP version:      5.2.6
PHP Bug Type:     Output Control
Bug description:  problem with zip php functions and symbolic links

Description:
------------
When using the zip php functions to extract or read a zip file containing
a symbolic link (ex: indx -> /home/myuser/public_html/index.html) it fails
to extract the original symbolic link it only returned the link name and
it's contents is the symbolic link path.


ln -s /home/myuser/public_html/index.html indx;ls -la 
28672300 lrwxrwxrwx  1 myuser mygroup   35 Sep  6 13:41 indx ->
/home/myuser/public_html/index.html

zip -y indx.zip indx;ls -la 
28672300 lrwxrwxrwx  1 myuser mygroup   35 Sep  6 13:41 indx ->
/home/myuser/public_html/index.html
28672304 -rw-r--r--  1 myuser mygroup  175 Sep  6 14:50 indx.zip

extracting php code to the indx.zip as following: 


Reproduce code:
---------------
<?php
$zip = new ZipArchive;
if ($zip->open('indx.zip') === TRUE) {
    $zip->extractTo('/home/myuser/public_html/');
    $zip->close();
    echo 'done';
} else {
    echo 'failed';
}
?>

Expected result:
----------------
expected to be extracted as :

indx -> /home/myuser/public_html/index.html

Actual result:
--------------
but actual reslult is :

indx

and the contents of indx is :

/home/myuser/public_html/index.html


Thx for your attention and hope to know if there is a different coding
method to zip a symbolic link by php zip functions or the above code was
expected to works well?

-- 
Edit bug report at http://bugs.php.net/?id=46013&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=46013&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=46013&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=46013&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=46013&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=46013&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=46013&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=46013&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=46013&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=46013&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=46013&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=46013&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=46013&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=46013&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=46013&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=46013&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=46013&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=46013&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=46013&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=46013&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=46013&r=mysqlcfg

Reply via email to