ID:               36152
 User updated by:  misiek at dione dot ids dot pl
 Reported By:      misiek at dione dot ids dot pl
 Status:           Closed
 Bug Type:         cURL related
 Operating System: *
 PHP Version:      5CVS, 4CVS (2006-01-25) (snap)
 Assigned To:      mike
 New Comment:

That ,,fix'' doesn't sound like fix, it's rather hidding things under
carpet.

libpq used by ext/pgsql sets own callbacks and curl resets them to it's
own :/


Previous Comments:
------------------------------------------------------------------------

[2006-01-26 14:28:46] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2006-01-25 11:46:52] [EMAIL PROTECTED]

A temporary fix could be to reset

        CRYPTO_set_id_callback(php_curl_ssl_id);
        CRYPTO_set_locking_callback(php_curl_ssl_lock);

prior calling curl_global_cleanup().

------------------------------------------------------------------------

[2006-01-25 11:21:41] [EMAIL PROTECTED]

Well, the problem apparently is, that PHP links with lots of libraries
using openssl and even openssl itself.

Some libs like libcurl leave it up to you to define crypto locking
callbacks while obviously libraries like libpq define their own if we
don't.

We'd need openssl crypto locking callbacks for all PHP once and adjust
extensions, which link libraries that would define their own callbacks,
accordingly.

This is just my best bet.



------------------------------------------------------------------------

[2006-01-25 11:21:39] misiek at dione dot ids dot pl

There are PQregisterThreadLock() and PQinitSSL() in libpq which allow
to move initialization from libpq to application.

------------------------------------------------------------------------

[2006-01-25 11:16:28] [EMAIL PROTECTED]

>curl tries to initialize openssl and then to setup own callbacks.
>pgsql via libpq does the same thing.
"curl" here means ext/curl, while ext/pgsql doesn't set its handlers,
libpq does that.
So personally I don't see a way to handle it, if an *external* library
changes callbacks that were set in PHP extension.
I guess the library should be fixed first.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/36152

-- 
Edit this bug report at http://bugs.php.net/?id=36152&edit=1

Reply via email to