Hey Joe, On Mo, 2017-11-13 at 13:57 +0000, Joe Watkins wrote: > I wasn't aware of the concurrency issues. Still, restricting the > build seems unnecessary. You may load the extension in a zts build of > php, but not actually be using any threads - you aren't going to be > loading it inside apache worker is my suspicion.
Yeah, since we got rid of isapi for MS IIS, I guess Apache worker is the only threaded environment we use (except for sapi/embed and custom sapis) it's probably no realistic worry. I just noticed the use of a global counter about how many times init is called and a global QApplication context, while I was trying to see if the init is trivial or not https://github.com/wkhtmltopdf/wkhtmltopdf/blob/master/src/lib/pdf_c_bi ndings.cc#L208 https://github.com/wkhtmltopdf/wkhtmltopdf/blob/master/src/lib/pdf_c_bi ndings.cc#L324 (that QApp pointer and the usage counter likely end up on the same cache line, so if there's a race there could be really weird effects, maybe it's enough to use atomics/mutexes for those two and Qt takes care of everything else, but I haven't checked further) > I already created the package on pecl, but we are not sure if it's > allowed or not, because of licensing issues. Oh, I'm not a lawyer, by understanding is that with LGPLv3 you may not distribute a single binary with PHP and that library both included, but if they live in separate binaries (one libwkhtmltox.so and one php executable i.e.) it's fine and if they are shipped as source side by side it's fine, too. See i.e. https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic With LGPL, contrary to GPL, the "virality" is limited to the library, but not across different libraries. GPL, basically, spreads at all things in the running process. (Both for v2 and v3) This might be more complicated if you'd use a C++ interface and template instantiations end up in the PHP side, but you're using just the C interface. But again, IANLAL :-) johannes -- PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php