|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-29 05:51 UTC] svn@php.net
[2009-09-29 05:51 UTC] torben@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 06:00:01 2026 UTC |
Description: ------------ The arguments for this function are incorrect. You will not notice this until you try to use dio_open and then dio_write. You will get this error on the console: 'Bad file descriptor'. the 'flags' parameter MUST include one of {O_RDONLY, O_WRONLY, O_RDWR}. It may also include any combination of the flags listed. the 'mode' parameter is NOT the read/write mode. It is the permissions of the file. For example 0644 or 0755. Notice that there are not quotes around these permissions. This works correctly on Fedora 10 x86_64 php 5.2.9. Reproduce code: --------------- <?php $fd = dio_open('output', O_CREAT | O_TRUNC, O_WRONLY); dio_write($fd, 'this is the output.'); dio_close($fd); ?> Expected result: ---------------- write 'this is the output.' to ./output Actual result: -------------- PHP Warning: dio_write(): cannot write data to file descriptor 0, Bad file descriptor in /home/mbarlocker- on line 4 ls -la ---------x 1 mbarlocker mbarlocker 0 2009-09-23 10:46 output