Why I Don't Use Debian's PHP Packages
From their 4.3.10-3 changelog:
Enable Zend Thread Safety for all SAPIs, meaning that our modules are now compiled for ZTS APIs as well.
I couldn't believe that they did this, so I checked it in the source... their rules indeed include the --enable-experimental-zts switch. Tip: Compile your own PHP packages for Debian!
Comments
Could your explain why this is a "bad" thing? Because I updated my php setup using apt today :)
Is it because its "experimental" or some "zts" specific thing?
This setting is only there for developers that want to build a ZTS build to test with without having to use a threaded webserver.
ZTS is going to slow down Apache (1.3) a lot and simply not meant to be used there - it also may cause problems with shared objects. Using ZTS in a CLI doesn't make sense at all - it also prohibits some extensions from being enabled there.
or get them from dotdeb.org :)
When PHP is compiled with thread-safety support it ends up performing numerous (slow) operations to ensure thread-safety. Because PHP in most cases runs in a non-threaded environment these are completely pointless.
"When [Perl] is compiled with thread-safety support it ends up performing numerous operations to ensure thread-safety."
"Because Perl in most cases runs in a non-threaded environment these are completely pointless."
But wait. Perl is generally always compiled threadsafe now, and has been for several years. This, among other things, facilitated mod_perl Just Working on threaded webservers. I have yet to hear anyone complain that mod_perl on apache 1.3 is "slow", so they should recompile libperl.
Seriously. If the concern is that it's "a bit slower", so what? So is compiling in every extension under the sun, which distributions do. If you want it as fast as possible, do Linux From Scratch, and compile everything the way you want it.
ZTS /does/ work, despite scare-mongering to the contrary. Yes, it can expose problems in underlying libraries, and we warn against that. Of course, it will only do so when ALSO run in a threaded webserver, so if you aren't prepared to deal with that, run apache1.3 or apache2-mpm-prefork. If you do want to take the plunge, hey, Debian won't stop you and so "no, that's bad, you bad, bad PHP user, don't dare try to use PHP threaded." Seriously, Derick. This debate has been going on for years. I made a decision to distribute the software in a certain way. It works. Get over it.
About two years ago I mailed the debian php package maintainers to ask for the addition of a pcntl-enabled CLI-php binary in the package ... I was told that php was only a web scripting language and was meant for nothing else ... When I pointed out that the source dist also built the CLI sapi by default, I got about the same response - something in the lines of "I know better than core developpers how PHP should be used". Months after that, the CLI-php (and with pcntl support) was silently added to the debian php4 package ... So I think it's just a question of time before the packager realizes he's just wrong by doing this ...
Life Line
Updated a bench and a waste_basket
I walked 8.3km in 1h25m37s
Created a recycling
I walked 10.5km in 1h46m57s
An interesting journey in story form, showing how English changed over time.
https://www.deadlanguagesociety.com/p/how-far-back-in-time-understand-english
A much better writer than I is summing up perfectly why I have such disdain for Generative AI/LLMs.
https://jonn.substack.com/p/so-why-do-i-feel-so-angry-about-this
Created a waste_basket; Updated a waste_basket; Deleted a bench
Created a bench; Updated 7 benches and a gate; Deleted 2 benches and a gate
Created 10 benches and 2 waste_baskets; Updated an information
Created a bench; Updated 2 benches; Deleted a bench
I hiked 18.1km in 3h17m10s
I walked 3.0km in 25m12s
Updated a restaurant
I walked 4.6km in 34m18s
I walked 0.7km in 5m33s
Updated a restaurant
Updated a pub
I walked 12.3km in 2h11m46s
I walked 2.9km in 29m53s
I walked 1.1km in 9m53s
Updated 2 house buildings
Updated 2 estate_agent offices
I walked 8.2km in 1h37m13s
I'm excited about the PHP UK Conference on Friday!
I am speaking on @Xdebug, but the whole programme looks great:
https://www.phpconference.co.uk/scheduleTickets are still available, and you'll get 10% off with the code "PHPUK26".
Will I see you there?


Shortlink
This article has a short URL available: https://drck.me/widud-php-p-3wm