On Tue, 25 Sep 2001, Stanislav Malyshev wrote:

> SH>>     I'd expect it to work with all php's above 4.0.8, the only problem
> SH>>     is that if you link PHP 4.0.8 with an older version of CURL this
> SH>>     will cause PHP compilation errors that maybe unforseen, therefore,
> SH>>     to right it truly portable, you need two version checks for each new
> SH>>     piece of code.
> SH>>
> SH>>     if (phpversion == 4.0.8 && curl_version == 7.9) {
> SH>>         curl_setopt($ch, CURLOPT_SSL_VERIFYRESULT, 1);
> SH>>     }
>
> No, I need just:
>       if ($curl_version >= 7.9) {
>               curl_setopt($ch, CURLOPT_SSL_VERIFYRESULT, 1);
>       }
>
> And this is way better for one simple reason - it's easy to know which
> version of cURL CURLOPT_SSL_VERIFYRESULT appeared in. It's pretty hard to
> know which version of PHP is required for that, unless you are familiar
> with CVSweb and stuff (or depend on ChangeLog and people really
> documenting changes in their commit messages - which is not the case,
> unfortunately).
> This is also way better for logical reasons - you don't really need PHP
> 4.0.8 here, you need recent cURL, right? You couldn't care less for PHP
> version one it supports what you want. Also, imagine this is a stand-alone
> extension - oops. You need to check version anyway, since it is not linked
> to any specific PHP release. Won't it be logical to just check what you
> want to know instead of trying to shave with an axe?
>
    no, you need PHP 4.0.8 or greater, if your isp is running curl 7.9
    with PHP 4.0.7 it won't work.  I don't imagine cURL becoming
    external (and if it did, it would have an extension_version()
    function to check that).  I don't see this as shaving with an axe...
    Its simple to wget a new cURL version and install it, and this
    assures that your php users don't have to do a version check of the
    underlying cURL library as well, if you use the latest php its
    guaranteed to support all the latest cURL features out of the box.
    I found that this was a problem that cURL-PHP users had (judging
    from personal mails), which is now solved, requiring from users
    something that is explicit, upgrade, or die :)

    Think about it from a php coder's perspective, if you're coding and
    you get a constant un-defined error, you know its in PHP X (no,
    we're not becoming an Apple product ;), and you check, ok, i have
    PHP X, would it be at all logical to check the cURL version?  not
    really, I'd assume that since PHP compiled with my cURL that all
    constants are available... only digging through the source will
    reveal that some constants are #ifdef'd out.

    -Sterling


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to