Re: OpenSSL and Phar
| From: | Pierre Joye | Date: | Mon, 23 Jun 2008 17:12:59 +0000 |
| Subject: | Re: OpenSSL and Phar | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-38548@lists.php.net to get a copy of this message | ||
On Mon, Jun 23, 2008 at 5:44 PM, Steph Fox <steph@phparch.com> wrote:
>> My main question now is why don't you actually reflect the (optional)
>> dependencies? bz2 and zlib compression available will not be available
>> if bz2 or zlib is not present, same for openssl.
>
> What do you mean? In config.w32? No need. In phpinfo()? We already do, just
> haven't added the openssl part yet because the configuration's up in the
> air.
Yes, in config.w32 and config.m4. Either using ADD_EXTENSION_DEP or
ADD_LIBS if you use the library directly. phar works smoothly without
them, fine, that makes them optional deps. But they are still
dependencies.
>> As testing has_xxx at runtime looks shiny and powerful, I don't think
>> it is worth the pain.
>
> Sorry, I failed to parse that sentence... :\
You know how a given feature is tested in phar?
PHAR_G(has_zlib) = zend_hash_exists(&module_registry, "zlib",
sizeof("zlib"));
then:
if (!PHAR_G(has_zlib)) ...
--
Pierre
http://blog.thepimp.net | http://www.libgd.org