chobie / php-uv Goto Github PK
View Code? Open in Web Editor NEWlibuv php extension
libuv php extension
Looks like uv_fs_close always returns the initial stream, even when this stream doesn't exist and close fails.
For example,
uv_fs_close($loop, 42, function ($result){});
returns 42
uv_fs_close($loop, 0, function ($result){});
returns 0, and so on.
since 141de07 commit. uv_fs* functions also accepts stream and socket resource.
but I don't know how to include ext/sockets/php_socket.h
on windows box.
for now, socket don't support on windows box.
I try to compile php-uv with source from php 5.4.6 on centos 6.2 64bit.
I got the following errors:
/root/downloads/php-uv/php_uv.c: In function ‘php_uv_zval_to_fd’:
/root/downloads/php-uv/php_uv.c:293: error: ‘php_socket’ undeclared (first use in this function)
/root/downloads/php-uv/php_uv.c:293: error: (Each undeclared identifier is reported only once
/root/downloads/php-uv/php_uv.c:293: error: for each function it appears in.)
/root/downloads/php-uv/php_uv.c:305: error: expected expression before ‘)’ token
/root/downloads/php-uv/php_uv.c:307: error: request for member ‘bsd_socket’ in something not a structure or union
Do you have any hints on this?
Thanks.
Here is my code
<?php
uv_fs_mkdir(uv_default_loop(), "test",
UV::O_CREAT | UV::S_IRWXU | UV::S_IRUSR,
function($r){
if ($r === -1) {
echo uv_last_error() . "\n";
return;
}
echo "ok\n";
});
uv_run();
When i run it without having a "test" directory within my current directory, it displays "ok", but if I re-run it the second time, mkdir fails (as expected), but the error code is 0. Is it a bug or am I doing something wrong ?
> ll
total 8
-rw-r--r-- 1 andrey staff 848 30 jan 15:59 script.php
> php script.php
ok
> php script.php
0
I tried to compile php-uv with gcc 4.6.3 on ubuntu 12.04 64 bit box, it compiled successfully but when i run uv_default_loop() in the code, it says:
undefined symbol: clock_gettime
Best Regards,
Jim
I have a problem regarding building php-uv. currently, I have to copy uv.a to libuv.a as I didn't know Autoconf settings in this case.
for now, this extension is able to build following steps.
cd libuv
make
cp uv.a libuv.a
cd ..
phpize
./configure
make
make install
Hello,
The following code produces a segmentation fault on Ubuntu 14.04 LTS with kernel version 3.13.0 and PHP 5.5.9 :
<?php
$ioRead = uv_stdio_new(null, Uv::CREATE_PIPE | Uv::INHERIT_STREAM);
$ioWrite = uv_stdio_new(null, Uv::CREATE_PIPE | Uv::INHERIT_STREAM);
$ioError = uv_stdio_new(null, Uv::CREATE_PIPE | Uv::INHERIT_STREAM);
$loop = uv_default_loop();
$command = 'ls';
$args = [];
$stdio = [
0 => $ioRead,
1 => $ioWrite,
2 => $ioError
];
$cwd = getcwd();
$env = [];
$callback = function() {
var_dump(func_get_args());
};
$flags = 0;
$options = [];
$process = uv_spawn($loop, $command, $args, $stdio, $cwd, $env, $callback, $flags, $options);
uv_run($loop);
PHP 5.5.9-1ubuntu4.3 (cli) (built: Jul 7 2014 16:36:58)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
uv
PHP libuv Extension
libuv Support => enabled
Version => 0.0.2
libuv Version => 0.10
http-parser Version => 2.2
When I use uv_fs_open and uv_fs_mkdir, using 777 mode results in files having 755 permissions.
Same for 222, which gives 200.
111 and 444 work fine though.
Example:
uv_fs_open($loop, $path, $flags, \UV::S_IRWXO | \UV::S_IRWXG | \UV::S_IRWXU, function ($r)
results in
-rwxr-xr-x 1 andrey staff 6 12 fév 12:13 test-file
libUV has a functionality to set the process' title. It would be great if this would be made available to userland.
see tests/800-uv_queue_work.phpt
---- EXPECTED OUTPUT
[queue][finished]
---- ACTUAL OUTPUT
[finished][queue]
---- FAILED
This code (the example code from uv_poll_start with only php://stdout replaced)
<?php
$fd = fopen("php://temp","w+");
$poll = uv_poll_init(uv_default_loop(), $fd);
uv_poll_start($poll, UV::WRITABLE, function($poll, $stat, $ev, $conn){
fwrite($conn, "Hello");
fclose($conn);
uv_poll_stop($poll);
});
uv_run();
results in
Aborted (core dumped)
It works fine on OS X though.
(I had to use gcc4.4 as described in #24 to make it work in the first place)
I get seg fault with
<?php
$uv = uv_udp_init();
uv_udp_bind($uv, uv_ip4_addr('0.0.0.0',10000));
uv_udp_recv_start($uv, function($stream, $nread, $buffer) use ($uv) {
echo "recv ($nread): " . $buffer . "\n";
});
uv_udp_send($uv, pack("CxxxC", 0x78, 0x00), uv_ip4_addr("85.234.210.138", 7778), function($socket, $s) { });
uv_udp_send($uv, pack("CxxxC", 0x78, 0x00), uv_ip4_addr("85.234.210.138", 7778), function($socket, $s) { });
uv_run();
?>
here is the back trace
recv (107): �a*Titan�Internet�Freon�Server�xming's placeDM-MokumX-MatrixFreon
0
recv (107): �a*Titan�Internet�Freon�Server�xming's placeDM-MokumX-MatrixFreon
0
Program received signal SIGSEGV, Segmentation fault.
uv__set_sys_error (loop=0x0, sys_error=sys_error@entry=11) at src/uv-common.c:133
133 loop->last_err.sys_errno_ = sys_error;
(gdb) bt
#0 uv__set_sys_error (loop=0x0, sys_error=sys_error@entry=11) at src/uv-common.c:133
#1 0x00007ffff05c587e in uv__udp_recvmsg (loop=<optimized out>, w=0x7ffff7ff4e48, revents=<optimized out>)
at src/unix/udp.c:237
#2 0x00007ffff05ca436 in ev_invoke_pending (loop=0x7ffff07f3160 <default_loop_struct>) at src/unix/ev/ev.c:2145
#3 0x00007ffff05be761 in uv__poll (loop=0x7ffff07f1600 <default_loop_struct>) at src/unix/core.c:248
#4 uv__run (loop=0x7ffff07f1600 <default_loop_struct>) at src/unix/core.c:257
#5 0x00007ffff05bea10 in uv_run (loop=0x7ffff07f1600 <default_loop_struct>) at src/unix/core.c:265
#6 0x00007ffff05ad731 in zif_uv_run () from /usr/src/xming/php-uv/modules/uv.so
#7 0x000000000081fc59 in ?? ()
#8 0x00000000007d480d in execute ()
#9 0x000000000076f2a2 in zend_execute_scripts ()
#10 0x0000000000704444 in php_execute_script ()
#11 0x0000000000822699 in ?? ()
#12 0x000000000047693f in main ()
uv_rwlock_try* and uv_mutex_try throws SIGABRT.
<?php
$lock = uv_mutex_init();
uv_mutex_lock($lock);
if (uv_mutex_trylock($lock)) { // throws SIGABRT
echo "OK" . PHP_EOL;
} else {
echo "FAILED" . PHP_EOL;
}
Hi, chobie.
Could you provide link to https://github.com/bwoebi/php-uv on README ?
bwoebi/php-uv is forks & currently maintained for PHP 7.
I think you currently have no motivation about php-uv.
so, I think induction is need for developers.
libgit2 uses their forked http-parser. php-uv might conflict with that.
While I am using the example inthe docs for uv_http_parser_init
and uv_http_parser_execute
(https://github.com/chobie/php-uv#example-102), with a POST request, I have in some cases a warning and the parsing fails :
Notice: uv_http_parser_execute(): passed uv_parser resource has already finished. in D:\php-env\workspace\php-io\src\test_http_parser.php on line 25
When I execute 10 times the example, the first 2 times works well, the following times it fails :
<?php
for ($i = 0; $i < 10; $i++) {
$parser = uv_http_parser_init(UV::HTTP_REQUEST);
$result = [];
$request = <<<REQUEST_EOF
POST /img/http-parser.png?key=value#frag HTTP/1.1
Host: chobie.net
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://chobie.net/
Cookie: key=value
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 50
licenseID=string&content=string&/paramsXML=string
REQUEST_EOF;
if (uv_http_parser_execute($parser, $request, $result)) {
var_dump($result);
}
}
I am using Windows builds from http://windows.php.net/downloads/pecl/snaps/uv/0.0.1/, with PHP as CLI :
$ php -v
PHP 5.4.11 (cli) (built: Jan 16 2013 20:26:43)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
$ php -i
phpinfo()
PHP Version => 5.4.11
System => Windows NT GREG-PC 6.0 build 6002 (Windows Vista Ultimate Edition Service Pack 2) i586
Build Date => Jan 16 2013 20:22:58
Compiler => MSVC9 (Visual C++ 2008)
Architecture => x86
Configure Command => cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-s
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => C:\Program Files (x86)\PHP\php-5.4\php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20100412
PHP Extension => 20100525
Zend Extension => 220100525
Zend Extension Build => API220100525,TS,VC9
PHP Extension Build => API20100525,TS,VC9
Debug Build => no
Thread Safety => enabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar
Registered Stream Socket Transports => tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters => convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
uv
PHP libuv Extension
libuv Support => enabled
Version => 0.0.1
bundled libuv Version => 0.9
bundled http-parser Version => 1.0
probably I made some mistake.
<?php
$in = uv_pipe_init(uv_default_loop(), 1);
$out = uv_pipe_init(uv_default_loop(), 1);
echo "HELLO ";
$process = uv_spawn(uv_default_loop(), "php", array('-r','echo $_ENV["HELLO"];'), array( /* TODO: ENV parameter does not work linux. */
"cwd" => dirname(uv_exepath()),
"pipes" => array(
$in,
$out,
),
"env" => array(
"KEY" => "VALUE",
"HELLO" => "WORLD",
)
),function($process, $stat, $signal) use ($out){
uv_close($process,function(){
});
});
uv_read_start($out, function($out, $buffer,$stat){
echo $buffer . PHP_EOL;
uv_close($out,function(){});
});
uv_run();
https://github.com/chobie/php-uv/tree/develop
TODO: take a look into PECL ares and write how to migrate bundled functions.
As I understand the behaviour of php-uv, if a Content-Length is specified, uv_http_parser_execute will fail if there's not enough data in the message body. This might not be an bug but a wanted feature, but there are situations in which this is an issue: for instance, if I try to send a 10000 characters long message, I'd like to be able to start parsing headers before all of the 10000 bytes are finished being sent.
I asked people from joyent about it, here's what I got:
csaoh: I realized I couldn't parse headers from a request unless it's been completely sent. For instance, if I send a request with Content-Length set to 5096, but with only 4096 bytes in the body (assuming the rest will be sent later), is there a way to parse the headers anyway ?
bnoordhuis: csaoh: well, the headers will have been parsed. http-parser doesn't buffer anything, it emits parsed header names/values immediately
So my guess is there is something in the php port that is blocking it (intentionally or not). Am I right ?
uv_listen(uv_tcp_init(), 511, function(){}); // leak
Hey there,
I got to the make && make install
part of your install docs and got the following output
[root@ppi php-uv]# make && make install /bin/sh /home/paul/code/php-uv/libtool --mode=compile cc -I. -I/home/paul/code/php-uv -DPHP_ATOM_INC -I/home/paul/code/php-uv/include -I/home/paul/code/php-uv/main -I/home/paul/code/php-uv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/home/paul/code/php-uv/http-parser -I/home/paul/code/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -c /home/paul/code/php-uv/php_uv.c -o php_uv.lo libtool: compile: cc -I. -I/home/paul/code/php-uv -DPHP_ATOM_INC -I/home/paul/code/php-uv/include -I/home/paul/code/php-uv/main -I/home/paul/code/php-uv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/home/paul/code/php-uv/http-parser -I/home/paul/code/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -c /home/paul/code/php-uv/php_uv.c -fPIC -DPIC -o .libs/php_uv.o In file included from /home/paul/code/php-uv/php_uv.h:32, from /home/paul/code/php-uv/php_uv.c:20: /usr/include/php/main/php.h:269: warning: redundant redeclaration of ‘environ’ /usr/include/unistd.h:542: note: previous declaration of ‘environ’ was here /home/paul/code/php-uv/php_uv.c: In function ‘php_uv_get_current_stream’: /home/paul/code/php-uv/php_uv.c:2167: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2170: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2173: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2176: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2179: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2182: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2185: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2188: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2194: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2197: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2200: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2203: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2206: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2209: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘php_uv_socket_getname’: /home/paul/code/php-uv/php_uv.c:2459: warning: dereferencing type-punned pointer might break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2466: warning: dereferencing type-punned pointer might break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2473: warning: dereferencing type-punned pointer might break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2480: warning: dereferencing type-punned pointer might break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_timer_start’: /home/paul/code/php-uv/php_uv.c:3961: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_timer_stop’: /home/paul/code/php-uv/php_uv.c:3991: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_timer_again’: /home/paul/code/php-uv/php_uv.c:4018: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_idle_start’: /home/paul/code/php-uv/php_uv.c:4109: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_idle_stop’: /home/paul/code/php-uv/php_uv.c:4141: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_getaddrinfo’: /home/paul/code/php-uv/php_uv.c:4178: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:4181: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:4184: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:4187: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_udp_recv_start’: /home/paul/code/php-uv/php_uv.c:4295: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_udp_recv_stop’: /home/paul/code/php-uv/php_uv.c:4326: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_udp_set_membership’: /home/paul/code/php-uv/php_uv.c:4353: warning: cast to pointer from integer of different size /home/paul/code/php-uv/php_uv.c: In function ‘php_ares_gethostbyname_cb’: /home/paul/code/php-uv/php_uv.c:4780: warning: ISO C90 forbids mixed declarations and code /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_ares_init_options’: /home/paul/code/php-uv/php_uv.c:4828: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:4855: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:4858: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_spawn’: /home/paul/code/php-uv/php_uv.c:5140: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:5217: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:5221: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_prepare_start’: /home/paul/code/php-uv/php_uv.c:5503: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_prepare_stop’: /home/paul/code/php-uv/php_uv.c:5534: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_check_start’: /home/paul/code/php-uv/php_uv.c:5587: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_check_stop’: /home/paul/code/php-uv/php_uv.c:5620: warning: dereferencing type-punned pointer will break strict-aliasing rules /home/paul/code/php-uv/php_uv.c: In function ‘php_uv_socket_getname’: /home/paul/code/php-uv/php_uv.c:1002: warning: dereferencing pointer ‘addr.486’ does break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:2480: note: initialized from here /home/paul/code/php-uv/php_uv.c:1007: warning: dereferencing pointer ‘a6’ does break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:1005: note: initialized from here /home/paul/code/php-uv/php_uv.c:1018: warning: dereferencing pointer ‘a4’ does break strict-aliasing rules /home/paul/code/php-uv/php_uv.c:1016: note: initialized from here /home/paul/code/php-uv/php_uv.c: In function ‘php_uv_fs_common’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:697: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:706: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:716: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:726: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:735: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:744: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:753: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:763: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:773: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:784: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:795: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:806: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:819: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:829: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:841: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:851: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:860: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:869: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:880: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:890: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:900: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:911: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:921: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:934: warning: called from here /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:949: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_async_send’: /home/paul/code/php-uv/php_uv.c:2162: warning: inlining failed in call to ‘php_uv_get_current_stream’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:5680: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_check_stop’: /home/paul/code/php-uv/php_uv.c:2162: warning: inlining failed in call to ‘php_uv_get_current_stream’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:5625: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_check_start’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:5595: warning: called from here /home/paul/code/php-uv/php_uv.c:2162: warning: inlining failed in call to ‘php_uv_get_current_stream’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:5597: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_prepare_stop’: /home/paul/code/php-uv/php_uv.c:2162: warning: inlining failed in call to ‘php_uv_get_current_stream’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:5540: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_prepare_start’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:5511: warning: called from here /home/paul/code/php-uv/php_uv.c:2162: warning: inlining failed in call to ‘php_uv_get_current_stream’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:5512: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_pipe_connect’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:4697: warning: called from here /home/paul/code/php-uv/php_uv.c:2162: warning: inlining failed in call to ‘php_uv_get_current_stream’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:4700: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘php_uv_udp_send’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:2509: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_udp_recv_start’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:4304: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_idle_start’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:4115: warning: called from here /home/paul/code/php-uv/php_uv.c: In function ‘zif_uv_timer_start’: /home/paul/code/php-uv/php_uv.c:430: warning: inlining failed in call to ‘php_uv_cb_init’: call is unlikely and code size would grow /home/paul/code/php-uv/php_uv.c:3967: warning: called from here /bin/sh /home/paul/code/php-uv/libtool --mode=compile cc -I. -I/home/paul/code/php-uv -DPHP_ATOM_INC -I/home/paul/code/php-uv/include -I/home/paul/code/php-uv/main -I/home/paul/code/php-uv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/home/paul/code/php-uv/http-parser -I/home/paul/code/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -c /home/paul/code/php-uv/uv.c -o uv.lo libtool: compile: cc -I. -I/home/paul/code/php-uv -DPHP_ATOM_INC -I/home/paul/code/php-uv/include -I/home/paul/code/php-uv/main -I/home/paul/code/php-uv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/home/paul/code/php-uv/http-parser -I/home/paul/code/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -c /home/paul/code/php-uv/uv.c -fPIC -DPIC -o .libs/uv.o In file included from /home/paul/code/php-uv/php_uv.h:32, from /home/paul/code/php-uv/uv.c:19: /usr/include/php/main/php.h:269: warning: redundant redeclaration of ‘environ’ /usr/include/unistd.h:542: note: previous declaration of ‘environ’ was here /bin/sh /home/paul/code/php-uv/libtool --mode=compile cc -I. -I/home/paul/code/php-uv -DPHP_ATOM_INC -I/home/paul/code/php-uv/include -I/home/paul/code/php-uv/main -I/home/paul/code/php-uv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/home/paul/code/php-uv/http-parser -I/home/paul/code/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -c /home/paul/code/php-uv/http-parser/http_parser.c -o http-parser/http_parser.lo libtool: compile: cc -I. -I/home/paul/code/php-uv -DPHP_ATOM_INC -I/home/paul/code/php-uv/include -I/home/paul/code/php-uv/main -I/home/paul/code/php-uv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/home/paul/code/php-uv/http-parser -I/home/paul/code/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -c /home/paul/code/php-uv/http-parser/http_parser.c -fPIC -DPIC -o http-parser/.libs/http_parser.o /home/paul/code/php-uv/http-parser/http_parser.c: In function ‘parse_url_char’: /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_dead’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_start_req_or_res’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_or_resp_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_start_res’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_HT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_HTT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_HTTP’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_first_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_first_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_first_status_code’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_status_code’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_status’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_res_line_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_start_req’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_method’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_http_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_http_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_http_HT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_http_HTT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_http_HTTP’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_first_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_first_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_req_line_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_header_field_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_header_field’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_header_value_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_header_value’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_header_value_lws’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_header_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_chunk_size_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_chunk_size’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_chunk_parameters’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_chunk_size_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_headers_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_headers_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_chunk_data’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_chunk_data_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_chunk_data_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_body_identity’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_body_identity_eof’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:417: warning: enumeration value ‘s_message_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c: In function ‘http_parser_parse_url’: /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_start_req_or_res’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_or_resp_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_start_res’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_HT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_HTT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_HTTP’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_first_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_first_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_first_status_code’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_status_code’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_status’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_res_line_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_start_req’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_method’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_spaces_before_url’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_http_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_http_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_http_HT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_http_HTT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_http_HTTP’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_first_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_first_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_req_line_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_header_field_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_header_field’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_header_value_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_header_value’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_header_value_lws’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_header_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_chunk_size_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_chunk_size’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_chunk_parameters’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_chunk_size_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_headers_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_headers_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_chunk_data’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_chunk_data_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_chunk_data_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_body_identity’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_body_identity_eof’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:1957: warning: enumeration value ‘s_message_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_dead’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_start_req_or_res’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_or_resp_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_start_res’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_HT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_HTT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_HTTP’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_first_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_first_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_first_status_code’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_status_code’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_status’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_res_line_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_start_req’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_method’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_spaces_before_url’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_schema’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_schema_slash’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_schema_slash_slash’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_host_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_port’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_path’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_query_string_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_query_string’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_fragment_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_fragment’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_http_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_http_H’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_http_HT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_http_HTT’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_http_HTTP’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_first_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_http_major’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_first_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_http_minor’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_req_line_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_header_field_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_header_field’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_header_value_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_header_value’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_header_value_lws’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_header_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_chunk_size_start’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_chunk_size’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_chunk_parameters’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_chunk_size_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_headers_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_headers_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_chunk_data’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_chunk_data_almost_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_chunk_data_done’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_body_identity’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_body_identity_eof’ not handled in switch /home/paul/code/php-uv/http-parser/http_parser.c:2021: warning: enumeration value ‘s_message_done’ not handled in switch /bin/sh /home/paul/code/php-uv/libtool --mode=link cc -DPHP_ATOM_INC -I/home/paul/code/php-uv/include -I/home/paul/code/php-uv/main -I/home/paul/code/php-uv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/home/paul/code/php-uv/http-parser -I/home/paul/code/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -o uv.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/paul/code/php-uv/modules php_uv.lo uv.lo http-parser/http_parser.lo libtool: link: cc -shared .libs/php_uv.o .libs/uv.o http-parser/.libs/http_parser.o -Wl,libuv/uv.a -Wl,-soname -Wl,uv.so -o .libs/uv.so /usr/bin/ld: libuv/uv.a(async.o): relocation R_X86_64_32 against
.rodata' can not be used when making a shared object; recompile with -fPIC
libuv/uv.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [uv.la] Error 1
[root@ppi php-uv]# Write failed: Broken pipe
`
prevent SEGV when some php codes raised Fatal error.
uv_read_start($stream, function($stream, $nread, $buffer) {
// raised Fatal error
});
currently, php-uv caused SEGV as clean up failed.
currently, uv_fs_event_init corrupted on OSX. It seems It calls php function on other thread.
on linux, no problem
Compilations fails with :
/bin/bash /tmp/php-uv/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/php-uv/include -I/tmp/php-uv/main -I/tmp/php-uv -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/tmp/php-uv/http-parser -I/tmp/php-uv/libuv/include -DHAVE_CONFIG_H -g -O2 -Wunused-variable -Wpointer-sign -Wimplicit-function-declaration -Winline -Wunused-macros -Wredundant-decls -Wstrict-aliasing=2 -Wswitch-enum -Wdeclaration-after-statement -Wl,libuv/uv.a -lrt -o uv.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/php-uv/modules php_uv.lo uv.lo http-parser/http_parser.lo
libtool: link: cc -shared -fPIC -DPIC .libs/php_uv.o .libs/uv.o http-parser/.libs/http_parser.o -lrt -O2 -Wl,libuv/uv.a -Wl,-soname -Wl,uv.so -o .libs/uv.so
/usr/bin/ld: libuv/uv.a(async.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
libuv/uv.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [uv.la] Error 1
Hi,
What will be the libevent's event_add, event_del equivalent functions in php-uv?
Thanks.
Best Regards,
Jim
hi,
The PHP License cannot be used for anything not released under *.php.net. An easy way to solve this problem is to release this extension under pecl.php.net.
Pros for this move besides solving the license issue:
Thanks for your work!
What are the instructions for compiling on win32? Unless I'm mistaken, phpize is not available on that platform.
I post this issue to keep a trace of my email exchange with chobie
there is no function like suspend and resume features on libuv.
probably it can handle with some refcount function but it seems hard.sorry, I can't remember it. it was very early stage on react and php-uv.
my code is very small so you do not mind it.
react also can handle non-tcp resource, right? so we have to use
uv_poll_* functions to implement it.
Hi, I tried the following code and it gave me
"Bus error (core dumped)" or "Segmentation fault (core dumped)" or "zend_mm_heap corrupted" errors, what will be the correct way to run this?
Thanks.
This is my code:
uv_fs_stat($loop, $filename, function ($result, $stat) use ($deferred, $loop) {
var_dump($result);
var_dump($stat);
}
here is the output:
int(0)
array(13) {
'dev' =>
int(16777218)
'ino' =>
int(6367243)
'mode' =>
int(33188)
'nlink' =>
int(1)
'uid' =>
int(501)
'gid' =>
int(20)
'rdev' =>
int(0)
'size' =>
int(4)
'blksize' =>
int(4096)
'blocks' =>
int(8)
'atime' =>
int(1360691724)
'mtime' =>
int(1360691724)
'ctime' =>
int(1360691724)
}
If i try the same with a file that doesn't exist, here is my output:
Segmentation fault: 11
Hi,
What will be the best way to download a large file over tcp using php-uv?
Thanks.
Best Regards,
Jim
Hi,
Is there anyway that php-uv can support ssl in a non-blocking fashion?
In my framework, I used stream_socket_server, like the following:
stream_context_set_option($context, 'ssl', 'local_cert', $certificate);
stream_context_set_option($context, 'ssl', 'verify_peer', false);
$server = stream_socket_server("$protocol://$ip:$port", $errno,$errstr,STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
The ssl part works but seems like it is blocking, I tried to make it non-blocking by doing:
stream_set_blocking($server, 0);
Things stop working.
Are there any ways that php-uv can help make serving ssl in an async fashion?
Thanks.
Best Regards,
Jim
I wish to be able to read n characters from a file. Right now, I can only read the whole file...
Hi,
Is there a way php-uv can share tcp server port in multiple processes? Like what node.js's cluster module did?
"A single instance of Node runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node processes to handle the load.
The cluster module allows you to easily create child processes that all share server ports."
Best Regards,
Jim
Hi,
How will we do something like node's process.nextTick in php-uv?
Thanks.
Best Regards,
Jim
#include <Zend/zend_ts_hash.h>
I didnt find these header file in php-src https://github.com/php/php-src/tree/6e6e301038284fcfef132f3be85ddc96330e834d/Zend
maybe last time it was separate zend_ts_hash and zend_hash
robust OOP interface (close connections automatically when error happened ...etc)
Not sure if other parts are affected as well, but the timers are definitely leaking. Possibly refcounts are not being decreased properly, because the callback is not being garbage collected.
See this PR for react and the examples/test-memory.php
script.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.