Re: library calls from within php functions

From: Date: Sun, 20 Oct 2002 08:34:36 +0000
Subject: Re: library calls from within php functions
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-89759@lists.php.net to get a copy of this message
Hi Tony, There's not much we can tell you about this unless you post the rest of the lines of that function. Perhaps you did not include <php.h> ? Note: always prefer this: read(fd, buf, sizeof(buf)); to this: read(fd, buf, 1024); The former is immune to buffer overruns if you change the size of buf at a later date, and is much more readable. --Wez. On 10/20/02, "Tony Leake" <tony@php.net> wrote: > Hi, > > I am working on an extension that makes use of the pipe, read and write > library calls on a linux platform. > > When I try to put this line > read(fd, buf, 1024); > inside a php function ( PHP_FUNCTION(read_pipe) ) it fails to compile > with the following warning: > called object is not a function. > > If I move the same line into a standard c function it compiles without > error. > > So my question is, is there some problem trying to make library calls > from within php functions? although other calls seem to work fine. > > Thanks for any help > Tony > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.dev (#89759) next »