/PHP-5.3/ext/standard/tests/file/ |
H A D | php_fd_wrapper_03.phpt | 2 php://fd wrapper: bad syntax 5 fopen("php://fd", "w"); 6 fopen("php://fd/", "w"); 7 fopen("php://fd/-2", "w"); 8 fopen("php://fd/1/", "w"); 14 Warning: fopen(php://fd): failed to open stream: operation failed in %s on line 2 16 Warning: fopen(php://fd/): failed to open stream: php://fd/ stream must be specified in the form ph… 18 Warning: fopen(php://fd/-2): failed to open stream: The file descriptors must be non-negative numbe… 20 Warning: fopen(php://fd/1/): failed to open stream: php://fd/ stream must be specified in the form …
|
H A D | userstreams_003.phpt | 30 function test($name, $fd, $return_value, $func, $args, $expected_option, $expected_value) { 32 $data = stream_get_meta_data($fd); 42 $fd = fopen("test://foo","r"); 45 test("stream_set_blocking - 1", $fd, true, "stream_set_blocking", array($fd,0), STREAM_OPTION_BLOCK… 46 test("stream_set_blocking - 2", $fd, false, "stream_set_blocking", array($fd,1), STREAM_OPTION_BLOC… 47 test("stream_set_blocking - 3", $fd, "foo", "stream_set_blocking", array($fd,0), STREAM_OPTION_BLOC… 50 test("stream_set_write_buffer - 1", $fd, true, "stream_set_write_buffer", array($fd,0), STREAM_OPTI… 51 test("stream_set_write_buffer - 2", $fd, true, "stream_set_write_buffer", array($fd,4096), STREAM_O… 52 test("stream_set_write_buffer - 3", $fd, false, "stream_set_write_buffer", array($fd,8192), STREAM_… 54 test("stream_set_timeout - 1", $fd, true, "stream_set_timeout", array($fd,10,11), STREAM_OPTION_REA… [all …]
|
H A D | bug44607.phpt | 11 $fd = fopen($tempnam, 'r'); 12 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 13 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 14 fseek($fd, 1, SEEK_SET); 15 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 16 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 17 fclose($fd);
|
H A D | userstreams_004.phpt | 19 function test($name, $fd, $mode) { 21 flock($fd, $mode); 22 $data = stream_get_meta_data($fd); 29 $fd = fopen("test://foo","r"); 35 test("fclock($mode)", $fd, constant($mode)); 36 test("fclock($mode|LOCK_NB)", $fd, constant($mode)|LOCK_NB);
|
H A D | userstreams_002.phpt | 19 function test($name, $fd, $return_value) { 21 $data = stream_get_meta_data($fd); 23 $r = array($fd); 31 $fd = fopen("test://foo","r"); 34 test("valid stream", $fd, STDIN); 36 test("return value is false", $fd, false); 37 test("return value not a stream resource", $fd, "foo"); 38 test("return value is stream itself", $fd, $fd); 39 test("return value cannot be casted", $fd, $fd2);
|
/PHP-5.3/sapi/fpm/fpm/events/ |
H A D | poll.c | 90 pollfds[i].fd = -1; in fpm_event_poll_init() 161 … && q->ev->index >= 0 && q->ev->index < npollfds && q->ev->fd == active_pollfds[q->ev->index].fd) { in fpm_event_poll_wait() 191 if (pollfds[next_free_slot].fd == -1) { in fpm_event_poll_add() 193 pollfds[next_free_slot].fd = ev->fd; in fpm_event_poll_add() 206 if (pollfds[i].fd != -1) { in fpm_event_poll_add() 212 pollfds[i].fd = ev->fd; in fpm_event_poll_add() 223 zlog(ZLOG_ERROR, "poll: not enought space to add event (fd=%d)", ev->fd); in fpm_event_poll_add() 236 if (ev->index >= 0 && ev->index < npollfds && pollfds[ev->index].fd == ev->fd) { in fpm_event_poll_remove() 241 pollfds[ev->index].fd = -1; in fpm_event_poll_remove() 253 if (pollfds[i].fd != ev->fd) { in fpm_event_poll_remove() [all …]
|
H A D | select.c | 120 if (FD_ISSET(q->ev->fd, ¤t_fds)) { in fpm_event_select_wait() 145 if (ev->fd >= FD_SETSIZE) { in fpm_event_select_add() 151 if (!FD_ISSET(ev->fd, &fds)) { in fpm_event_select_add() 152 FD_SET(ev->fd, &fds); in fpm_event_select_add() 153 ev->index = ev->fd; in fpm_event_select_add() 166 if (FD_ISSET(ev->fd, &fds)) { in fpm_event_select_remove() 167 FD_CLR(ev->fd, &fds); in fpm_event_select_remove()
|
H A D | epoll.c | 164 e.data.fd = ev->fd; in fpm_event_epoll_add() 172 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, ev->fd, &e) == -1) { in fpm_event_epoll_add() 173 zlog(ZLOG_ERROR, "epoll: unable to add fd %d", ev->fd); in fpm_event_epoll_add() 178 ev->index = ev->fd; in fpm_event_epoll_add() 192 e.data.fd = ev->fd; in fpm_event_epoll_remove() 200 if (epoll_ctl(epollfd, EPOLL_CTL_DEL, ev->fd, &e) == -1) { in fpm_event_epoll_remove() 201 zlog(ZLOG_ERROR, "epoll: unable to remove fd %d", ev->fd); in fpm_event_epoll_remove()
|
H A D | devpoll.c | 98 pollfds[i].fd = -1; in fpm_event_devpoll_init() 179 if (q->ev && q->ev->fd == active_pollfds[i].fd) { in fpm_event_devpoll_wait() 206 pollfd.fd = ev->fd; in fpm_event_devpoll_add() 217 ev->index = ev->fd; in fpm_event_devpoll_add() 231 pollfd.fd = ev->fd; in fpm_event_devpoll_remove()
|
/PHP-5.3/ext/gd/libgd/ |
H A D | gd_gif_in.c | 114 gdIOCtx *fd = gdNewFileCtx(fdFile); in gdImageCreateFromGif() local 117 im = gdImageCreateFromGifCtx(fd); in gdImageCreateFromGif() 119 fd->gd_free(fd); in gdImageCreateFromGif() 149 if (! ReadOK(fd,buf,6)) { in gdImageCreateFromGifCtx() 164 if (! ReadOK(fd,buf,7)) { in gdImageCreateFromGifCtx() 188 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx() 196 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx() 209 if (! ReadOK(fd,buf,9)) { in gdImageCreateFromGifCtx() 244 ReadImage(im, fd, width, height, in gdImageCreateFromGifCtx() 331 if (! ReadOK(fd,&count,1)) { in GetDataBlock_() [all …]
|
/PHP-5.3/sapi/fpm/fpm/ |
H A D | fpm_stdio.c | 28 int fd = open("/dev/null", O_RDWR); in fpm_stdio_init_main() local 30 if (0 > fd) { in fpm_stdio_init_main() 35 if (0 > dup2(fd, STDIN_FILENO) || 0 > dup2(fd, STDOUT_FILENO)) { in fpm_stdio_init_main() 37 close(fd); in fpm_stdio_init_main() 40 close(fd); in fpm_stdio_init_main() 89 int fd = ev->fd; in fpm_stdio_child_said() local 265 int fd; in fpm_stdio_open_error_log() local 279 if (0 > fd) { in fpm_stdio_open_error_log() 286 dup2(fd, STDERR_FILENO); in fpm_stdio_open_error_log() 290 close(fd); in fpm_stdio_open_error_log() [all …]
|
H A D | fastcgi.c | 50 #define FCGI_LOCK(fd) \ argument 62 #define FCGI_UNLOCK(fd) \ argument 130 # define FCGI_LOCK(fd) argument 285 req->fd = -1; in fcgi_init_request() 754 close(req->fd); in fcgi_close() 756 req->fd = -1; in fcgi_close() 769 if (req->fd < 0) { 825 req->fd = -1; 849 fds.fd = req->fd; 899 return req->fd; [all …]
|
/PHP-5.3/main/ |
H A D | php_open_temporary_file.c | 103 int fd = -1; in php_do_open_temporary_file() local 161 fd = mkstemp(opened_path); in php_do_open_temporary_file() 164 fd = VCWD_OPEN(opened_path, open_flags); in php_do_open_temporary_file() 168 if (fd == -1 || !opened_path_p) { in php_do_open_temporary_file() 174 return fd; in php_do_open_temporary_file() 254 int fd; in php_open_temporary_fd_ex() local 277 if (fd == -1) { in php_open_temporary_fd_ex() 281 return fd; in php_open_temporary_fd_ex() 294 if (fd == -1) { in php_open_temporary_file() 298 fp = fdopen(fd, "r+b"); in php_open_temporary_file() [all …]
|
H A D | php_network.h | 114 php_socket_t fd; member 154 static inline int php_pollfd_for(php_socket_t fd, int events, struct timeval *timeouttv) in php_pollfd_for() argument 159 p.fd = fd; in php_pollfd_for() 172 static inline int php_pollfd_for_ms(php_socket_t fd, int events, int timeout) in php_pollfd_for_ms() argument 177 p.fd = fd; in php_pollfd_for_ms() 196 # define PHP_SAFE_FD_SET(fd, set) FD_SET(fd, set) argument 197 # define PHP_SAFE_FD_ISSET(fd, set) FD_ISSET(fd, set) argument 200 # define PHP_SAFE_FD_SET(fd, set) do { if (fd < FD_SETSIZE) FD_SET(fd, set); } while(0) argument 201 # define PHP_SAFE_FD_ISSET(fd, set) ((fd < FD_SETSIZE) && FD_ISSET(fd, set)) argument
|
/PHP-5.3/ext/session/ |
H A D | mod_files.c | 54 int fd; member 135 if (data->fd != -1) { in ps_files_close() 141 close(data->fd); in ps_files_close() 142 data->fd = -1; in ps_files_close() 171 if (data->fd != -1) { in ps_files_open() 178 close(data->fd); in ps_files_open() 188 close(data->fd); in ps_files_open() 317 data->fd = -1; in PS_OPEN_FUNC() 352 if (data->fd < 0) { in PS_READ_FUNC() 395 if (data->fd < 0) { in PS_WRITE_FUNC() [all …]
|
/PHP-5.3/ext/bz2/tests/ |
H A D | 004.phpt | 9 var_dump(bzerror($fd)); 10 var_dump(bzerrstr($fd)); 11 var_dump(bzerrno($fd)); 18 var_dump(bzread($fd, 10)); 19 var_dump(bzerror($fd)); 20 var_dump(bzerrstr($fd)); 21 var_dump(bzerrno($fd)); 28 var_dump(bzread($fd)); 29 var_dump(bzerror($fd)); 30 var_dump(bzerrstr($fd)); [all …]
|
H A D | 003.phpt | 8 $fd = bzopen(dirname(__FILE__)."/003.txt.bz2","r"); 10 var_dump(bzread($fd, 1 ,0)); 11 var_dump(bzread($fd, 0)); 12 var_dump(bzread($fd, -10)); 13 var_dump(bzread($fd, 1)); 14 var_dump(bzread($fd, 2)); 15 var_dump(bzread($fd, 100000));
|
/PHP-5.3/ext/standard/tests/streams/ |
H A D | bug63240.phpt | 5 $fd = fopen('php://temp', 'r+'); 8 fwrite($fd, $str); 9 rewind($fd); 10 $line = stream_get_line($fd, 9000, $delimiter); 12 $line = stream_get_line($fd, 9000, $delimiter);
|
H A D | bug44818.phpt | 7 $fd = fopen($url, $mode); 8 var_dump($fd, fwrite($fd, b"foo")); 9 var_dump(fseek($fd, 0, SEEK_SET), fread($fd, 3)); 10 fclose($fd);
|
/PHP-5.3/ext/standard/tests/filters/ |
H A D | bug46164-2.phpt | 17 $fd = fopen('php://memory','w'); 18 $filter = stream_filter_append($fd, 'user_filter'); 19 fwrite($fd, "foo"); 20 fflush($fd); 21 var_dump(fclose($fd));
|
/PHP-5.3/ext/standard/ |
H A D | php_fopen_wrapper.c | 162 int fd = -1; in php_stream_url_wrap_php() local 224 fd = STDIN_FILENO; in php_stream_url_wrap_php() 226 fd = dup(fd); in php_stream_url_wrap_php() 237 fd = STDOUT_FILENO; in php_stream_url_wrap_php() 239 fd = dup(fd); in php_stream_url_wrap_php() 250 fd = STDERR_FILENO; in php_stream_url_wrap_php() 252 fd = dup(fd); in php_stream_url_wrap_php() 300 fd = dup(fildes_ori); in php_stream_url_wrap_php() 301 if (fd == -1) { in php_stream_url_wrap_php() 350 if (fd == -1) { in php_stream_url_wrap_php() [all …]
|
/PHP-5.3/ext/fileinfo/libmagic/ |
H A D | compress.c | 154 swrite(int fd, const void *buf, size_t n) in swrite() argument 160 switch (rv = write(fd, buf, n)) { in swrite() 187 if (fd == STDIN_FILENO) in sread() 200 FD_SET(fd, &check); in sread() 216 (void)ioctl(fd, FIONREAD, &t); in sread() 227 switch ((rv = FINFO_READ_FUNC(fd, buf, n))) { in sread() 299 if ((fd = dup2(tfd, fd)) == -1) { in file_pipe2file() 308 return fd; in file_pipe2file() 406 if (fd != -1) { in uncompressbuf() 407 (void) dup(fd); in uncompressbuf() [all …]
|
/PHP-5.3/main/streams/ |
H A D | plain_wrapper.c | 135 int fd; in do_fstat() local 158 self->fd = fd; in _php_stream_fopen_from_fd_int() 183 if (fd != -1) { in _php_stream_fopen_temporary_file() 188 close(fd); in _php_stream_fopen_temporary_file() 202 if (fd != -1) { in _php_stream_fopen_tmpfile() 214 close(fd); in _php_stream_fopen_tmpfile() 422 data->fd = -1; in php_stdiop_close() 478 int fd; in php_stdiop_cast() local 550 int fd; in php_stdiop_set_option() local 899 int fd; in _php_stream_fopen() local [all …]
|
/PHP-5.3/ext/zip/lib/ |
H A D | zip_fdopen.c | 43 int fd; in zip_fdopen() local 49 if ((fd=dup(fd_orig)) < 0) { in zip_fdopen() 54 if ((fp=fdopen(fd, "rb")) == NULL) { in zip_fdopen() 55 close(fd); in zip_fdopen()
|
/PHP-5.3/sapi/cli/tests/ |
H A D | 022.inc | 6 $fd = fopen("php://stdin","r"); 7 var_dump($fd); 9 $client_socket = stream_socket_accept($fd);
|