-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sep 6, 2007, at 04:24:32, Hartmut Holzgraefe wrote:

BuildSmart wrote:

The only differences I could find was that openssl was enabled in the working builds but not enabled in the failing build.
[...]
I went a step further and manually added the ssl libraries (-lssl - lcrypto) to the Makefile (both as bundled and shared) and all worked well. This cannot be considered a bug (or maybe it is), perhaps an additional check could/should be performed to see if mysql is built with SSL support and if so check whether openssl is enabled and add the ssl libraries to the sapi build or to MYSQL_SHARED_LDADD if it's not or to auto-enable openssl?

yes, ext/mysql is not too clever about this and simply relies
on ext/openssl being enabled at the same time.

Adding an extra test can't rely on mysql_config though as AFAIR
it is not using mysql_config at all.

If you want to check whether you'd need to add a compile/link
test with a small example program that tries to e.g. use

my current test was to change it to use mysql_config to retrieve the library details which seemed to work.


  http://dev.mysql.com/doc/refman/4.1/en/mysql-ssl-set.html

I'm not sure though whether this function is only available
with ssl-enabled MySQL builds or whether it is always there
and just returning error codes, i think it is the later so
you'd have to create a functionality test, not just a simple
"does it compile and link without errors" one.

Based on your suggestion I tested this and sure enough, simple compiling tests are inconclusive because it returns 0 even when ssl is not available in mysql5 and a test of anything less than a valid mysql ssl connection seems to be inadequate (or I haven't located/ performed the correct test yet).

In mysql4 (4.1.10 and 4.1.13) it doesn't seem to initialize the ssl library automatically (or properly) and ext/mysql doesn't call mysql_ssl_set so while a connection can be established, I couldn't execute any queries successfully or retrieve any server info (just query failures).


As this is not a change to the actual functionality of ext/mysql
i think a working patch would be accepted even though the
extension is deprecated by now. OTOH i don't really think it
is worth the effort anymore though ...

If it's been EOL'd or NLS'd then working on it doesn't make for a sound decision and my time would be better spent learning how to replace mysql calls with mysqli calls if mysqli has been proven to work properly with mysql-ssl connections.


--
Hartmut Holzgraefe, Principal Support Engineer

- -- Dale


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)

iD8DBQFG38iP0hzWbkf0eKgRAvBCAJ9p84pkizvy/toQW/QgKk0p+fdN2gCeJ91Y
rKwGtxetE+Tt5UDD155mWC8=
=uqIR
-----END PGP SIGNATURE-----

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to