Skip to content
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

NTS/ZTS versions ? #63

Closed
drupol opened this issue Jan 12, 2022 · 2 comments
Closed

NTS/ZTS versions ? #63

drupol opened this issue Jan 12, 2022 · 2 comments

Comments

@drupol
Copy link
Collaborator

drupol commented Jan 12, 2022

Hello,

I would like to tests some stuff locally using NTS version of PHP.

From https://stackoverflow.com/questions/1623914/what-is-thread-safe-or-non-thread-safe-in-php:

The Non-Thread Safe version should be used if you install PHP as a CGI binary, command line interface or other environment where only a single thread is used.

A thread-safe version should be used if you install PHP as an Apache module in a worker MPM (multi-processing model) or other environment where multiple PHP threads run concurrently.

I'm using my own package to provide a development shell here: https://github.com/loophp/nix-shell/

This morning, I was trying to disable ZTS support so I can use NTS, but it is not working. I committed this: loophp/nix-shell@11565ae but the PHP version produced is always ZTS.

Could you please give me some advice on how to do that?

Thanks.

@drupol
Copy link
Collaborator Author

drupol commented Jan 12, 2022

I finally found a solution here: loophp/nix-shell@15d8a8a

I'm wondering if this is normal. In order to disable ZTS, I have to disable the flag apxs2Support.

If I change the line:

  phpOverride = (phps.${version}.override { apxs2Support = apxs2Support; }).buildEnv {

into

  phpOverride = (phps.${version}.override { ztsSupport = apxs2Support; }).buildEnv {

it doesn't work. I found it here: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/interpreters/php/generic.nix#L53

By the way, how about building NTS version by default in Nixos ?

@drupol
Copy link
Collaborator Author

drupol commented Jan 16, 2023

Closing this issue, support for NTS is now enabled by default in Nix.

@drupol drupol closed this as completed Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant