kitech / php-go

Write PHP extension using go/golang. Zend API wrapper for go/golang.
882 stars 108 forks source link

php warning and error #8

Closed nangong92t closed 8 years ago

nangong92t commented 8 years ago

run examples/hello.php

show php warning: Warning: Wrong parameter count for PGDemo::Hello1()

or show----

nginx error: [error] 12199#0: *471 recv() failed (104: Connection reset by peer) while reading response header from upstream,

php version 5.6 nginx+php-fpm go version 1.6

kitech commented 8 years ago

can you try run hello.php on console: php -f examples/hello.php

kitech commented 8 years ago

confirmed, thanks.

case 1: if nginx return 200

the nginx-error.log will show php warning: Warning: Wrong parameter count for PGDemo::Hello1()

but will get the method's return value.

and the php-fpm will not crash.

case 2: if nginx return 502

the nginx-error.log will show: [error] 12199#0: *471 recv() failed (104: Connection reset by peer) while reading response header from upstream,

no method return value

and the php-fpm will crash.

kitech commented 8 years ago

fixed case 1 now

nangong92t commented 8 years ago

其实你可以说中文

kitech commented 8 years ago

wow, see this, think good: https://github.com/kitech/php-go/issues/5#issuecomment-223853435