rryqszq4 / ngx-php

ngx-php - Embedded php7 or php8 scripting language for nginx module. Mainline development version of the ngx-php.
BSD 2-Clause "Simplified" License
582 stars 56 forks source link

Ngx-php as SAPI name #157

Closed joanhey closed 1 year ago

joanhey commented 1 year ago

The important think, it is NOT lose the opcache. For that I added first the opcache test #156.

Added test in hello.t, to echo php_sapi_name().

It's working with all (~except 7.0~). Now checking the sapi struct changes in php versions. ~Still waiting for test the opcache, when the other PR is merged.~ ~Opcache fail for now.~

Added PR to php-src, to add ngx-php to supported SAPIs. https://github.com/php/php-src/pull/11013 (was merged so in PHP 8.3 or before, we can use ngx-php SAPI)

But for now we will have to use the cli-server SAPI still, or we lose the opcache.

joanhey commented 1 year ago

We use cli-server, till PHP 8.3. @rryqszq4 ~I left to you the fix for PHP 7.0~