Req #28279 [Sus->Csd]: function symlink() crash under windows

From: Date: Sun, 11 Mar 2018 17:02:41 +0000
Subject: Req #28279 [Sus->Csd]: function symlink() crash under windows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214287@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=28279&edit=1 ID: 28279 Updated by: cmb@php.net Reported by: motion4u at hotmail dot com Summary: function symlink() crash under windows -Status: Suspended +Status: Closed Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: Windows 2000 Advanced PHP Version: 4.3.6 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: symlink(), readlink(), linkinfo() and link() are available on Windows as of PHP 5.3.0. Previous Comments: ------------------------------------------------------------------------ [2004-05-05 11:17:15] wez@php.net Windows versions of PHP don't even have symlink(), readlink(), linkinfo() or link(), so it can't possibly be crashing. I'll accept your feature request for NTFS junctions, but can't do anything about it until we are developing PHP 5.1. ------------------------------------------------------------------------ [2004-05-05 05:30:06] motion4u at hotmail dot com Description: ------------ Create and Manipulate NTFS Junction Points doesn't work in PHP but it was solved by www.sysinternals.com. They also offer the c-code free for download. I have tested it and it works very well. You can download the free source code there: http://www.sysinternals.com/files/jnctnsrc.zip Reproduce code: --------------- $letters = 'abcdefghijklmnopqrstuvwxyz'; srand((double) microtime() * 1000000); $string = ''; for ($i = 1; $i <= rand(4,12); $i++) { $q = rand(1,24); $string = $string . $letters[$q]; } //----- this part can't work under windows $handle = opendir($downloaddir); while ($dir = readdir($handle)) { if (is_dir($downloaddir . $dir)){ if ($dir != "." && $dir != ".."){ @unlink($downloaddir . $dir . "/" . $filename); @rmdir($downloaddir . $dir); } } } closedir($handle); //------ mkdir($downloaddir . $string, 0777); // here symlink produce browser crash under windows symlink($safedir . $filename, $downloaddir . $string . "/" . $filename); Header("Location: ".$downloadURL.$string. "/" . $filename); Expected result: ---------------- start downloading but produce browser crash ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=28279&edit=1

« previous php.bugs (#214287) next »