Skip to content

Add FrankenPHP to SAPI credits #9777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

alexander-schranz
Copy link

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

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

/cc @dunglas

@krakjoe
Copy link
Member

krakjoe commented Oct 18, 2022

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
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
Copy link
Member

krakjoe commented Oct 19, 2022

@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
Copy link
Member

dunglas commented Oct 19, 2022

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