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

[question] ZTS version of php #174

Open
DubbaThony opened this issue Jul 25, 2024 · 3 comments
Open

[question] ZTS version of php #174

DubbaThony opened this issue Jul 25, 2024 · 3 comments

Comments

@DubbaThony
Copy link

DubbaThony commented Jul 25, 2024

Is it possible to get PHP-ZTS (Zend Thread Safe, compilation flag, allows installing parallel extension) with asdf-php? Even if this would mean I need to locally build it (just want to have asdf goodies such as .tool-version file).

I need it when working with react php with parallel library - the parallel extension cannot work with non-thread safe build of PHP.

Note: im not asking for default to be ZTS. Most people don't need ZTS and it comes at performence cost

@x-rush
Copy link

x-rush commented Jan 16, 2025

Is it resolved? I want to try the multi-threading feature of Swoole v6, but it requires PHP with ZTS.👀👀👀

@DubbaThony
Copy link
Author

For me, I ended up changing the script on my local machine, knowing full well that its not really correct way to go about it

@x-rush
Copy link

x-rush commented Jan 16, 2025

I succeeded~
I read the “install” file and found an environment variable “PHP_CONFIGURE_OPTIONS” that allows for custom compilation options, so i did this

export PHP_CONFIGURE_OPTIONS="--enable-zts"
asdf install php 8.2.27

But there is an issue with the script; the PHP_CONFIGURE_OPTIONS overrides the os_based_configure_options function, causing the loss of some extensions such as openssl. So, I edited line 159 to supplement os_based_configure_options like this:

local configure_options="$PHP_CONFIGURE_OPTIONS $(os_based_configure_options) $global_config"

finally~
Image

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

No branches or pull requests

2 participants