Everytime I build my exe, it automatically compiles the php with thread safe disabled. How would I enable thread safe, I’ve tried downloading php 7.2 TS and replace it in the PHP7Runtime folder but it still compiles php without thread safe
ExeOutput only supports the Non Thread Safe version of PHP, as Windows IIS. Is there some reason why you need the TS version?
Yes I need it because I wanna install pthreads extension
OK. We put it on our todo list for research.
I have the same problem. Is it done yet ?
Same here, I am also looking for pthreads extension for multi threading in php. which requires pthread and threadsafety to operate. please look
Not to be Debbie downer, but in our classroom experiments, pthreads really bogged down low and midrange laptops. I am not talking about extensive tests, but “classroom experiments”. Part of the final report compiled by students is below:
- Alternatives: For web applications, it is generally more common to use asynchronous processing or task queues (like RabbitMQ or Redis with workers) to handle concurrent tasks. These methods allow you to achieve parallelism without directly dealing with multithreading complexities.
- Performance Considerations: While multithreading can theoretically improve performance by leveraging multiple CPU cores, the overhead of managing threads, along with PHP’s memory model and garbage collection, can lead to unexpected performance issues. As a result, developers often find that traditional multi-process approaches are more effective in PHP.
Only throwing this out as something to “think about”. Not every user is going to own higher-end machines with killer CPU’s. Not saying a bad idea, just laying out what we learned in class project.
Being able to choose TS and NTS would be the way to go if possible, so everyone is a big happy family