|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16707 dio_fcntl arg key should be whence not wenth
Submitted: 2002-04-19 15:56 UTC Modified: 2002-07-05 15:34 UTC
From: bob at mroczka dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.2.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bob at mroczka dot com
New email:
PHP Version: OS:


 [2002-04-19 15:56 UTC] bob at mroczka dot com
this call was failing everytime with a -1.
i looked at ext/dio/dio.c to figure this out.

when i changed the key name to whence it didn't solve 
my problem completely.

to make the call work i had to change the way i called
the function from:
dio_fcntl($fd, F_SETLKW, array('start'  => 0, 'length' => 0, 
'whence' => SEEK_SET,'type' => F_WRLCK))
dio_fcntl($fd, F_SETLKW, F_WRLCK)

it appears there is still a problem with argument handling
that i couldn't quite figure out right away.  if i find out i'll try to reply back to this document.

i am using 4.2.0rc4


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-19 16:03 UTC] bob at mroczka dot com
i did find something odd looking about line number 346:
if (zend_hash_find(fh, "type", 6, (void **) &element) == FAILURE) {

i changed the 6 to a 4 and recompiled.  didn't quite solve the argument problem though.
 [2002-05-24 15:12 UTC]
not a doc problem
 [2002-07-05 15:34 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 09:01:27 2023 UTC