Skip to content

Add FrankenPHP to SAPI credits#9777

Closed
alexander-schranz wants to merge 2 commits into
php:masterfrom
alexander-schranz:patch-3
Closed

Add FrankenPHP to SAPI credits#9777
alexander-schranz wants to merge 2 commits into
php:masterfrom
alexander-schranz:patch-3

Conversation

@alexander-schranz

@alexander-schranz alexander-schranz commented Oct 18, 2022

Copy link
Copy Markdown

FrankenPHP was added here but is not listed in when running: php -r 'echo phpinfo();' in the SAPI credits section.

/cc @dunglas

@krakjoe

krakjoe commented Oct 18, 2022

Copy link
Copy Markdown
Member

Frankenphp was not added to php-src: The credits files are for code distributed with source code.

@krakjoe krakjoe closed this Oct 18, 2022
@alexander-schranz

Copy link
Copy Markdown
Author

@krakjoe is there any other way to detect which SAPI's are supported by php opcache instance.

I was trying to use php -r 'echo phpinfo();' | grep frankenPHP to detect if PHP is compiled with FrankenPHP support.

@alexander-schranz alexander-schranz deleted the patch-3 branch October 18, 2022 19:42
@krakjoe

krakjoe commented Oct 19, 2022

Copy link
Copy Markdown
Member

@alexander-schranz I defer to @dunglas for an answer to the question of how to detect if you are currently executing inside a frankenphp instance.

The change that was made to opcache was only to add frankenphp to the whitelist of SAPI's that are supported by opcache, allowing opcache to operate in a frankenphp instance. It should probably be noted that no internal testing was done by the php team; We assume that the author of the SAPI done that testing before making the PR to add support.

I hope that makes things clearer.

@dunglas

dunglas commented Oct 19, 2022

Copy link
Copy Markdown
Member

To check if FrankenPHP is used, you can just verify that the value of the Server API cell of the table printed by phpinfo() is FrankenPHP. You should also see an entry like this:

image

If using our official build, the $_SERVER['SERVER_SOFTWARE'] will also be set to FrankenPHP. If you use the worker mode, the $_SERVER['FRANKENPHP_WORKER'] is set to 1.

To check if opcache is enabled, do as usual by inspecting the value of opcache.enable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants