Add ngx-php to opcache supported sapis#11013
Conversation
Now we are using the cli-server. But it's time to use our name in the SAPI. This SAPI embed PHP in Nginx server. https://github.com/rryqszq4/ngx-php And in the Techempower benchmarks, it's the fastest PHP SAPI. https://www.techempower.com/benchmarks/#section=data-r20 Thank you.
|
Welcome any help to this SAPI :) |
|
Perhaps will be good to facilitate to new SAPIs, to use the OPcache. |
iluuu1994
left a comment
There was a problem hiding this comment.
In the future, it might make more sense for the SAPI to opt into opcache rather than opcache opting into SAPIs. But this looks ok to me for what we have now.
|
hi @joanhey, I suspect ngx-php is not going to be fully compatible with opcache. It's not a big problem to merge this commit, but it's better to implement @iluuu1994 idea (add some SAPI flag). |
|
It's multi-process and one thread in per-process, because nginx use multi-process . So php handle request one by one in pre-process of nginx. But we can also include php files outside of the init worker, and without the OPcache the performance is not very good. |

Now we are using the cli-server.
But it's time to use our name in the SAPI.
This SAPI embed PHP in Nginx server.
https://github.com/rryqszq4/ngx-php
And in the Techempower benchmarks, it's the fastest PHP SAPI. https://www.techempower.com/benchmarks/#section=data-r20
Thank you.