i have tryed the pecl-mongo Version (1.6.5) and the latest dev Version from Source (1.7.0dev) with the same results:
mongodb is 3.0.1 build with SSL and works fine.
root@mdb30:~# valgrind php -n -dextension=mongo.so mongo.tutorial.php
==16976== Memcheck, a memory error detector
==16976== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==16976== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==16976== Command: php -n -dextension=mongo.so mongo.tutorial.php
==16976==
==16976== Invalid read of size 8
==16976== at 0x6A7A4E: php_stream_context_get_option (in /usr/bin/php5)
==16976== by 0x7975276: php_mongo_io_stream_connect (io_stream.c:186)
==16976== by 0x798542A: mongo_connection_create (connections.c:88)
==16976== by 0x7987643: mongo_get_connection_single (manager.c:94)
==16976== by 0x79878E0: mongo_get_connection_multiple (manager.c:411)
==16976== by 0x79886FD: mongo_get_read_write_connection (manager.c:553)
==16976== by 0x795F8C1: php_mongo_connect (mongoclient.c:357)
==16976== by 0x796009D: php_mongo_ctor (mongoclient.c:571)
==16976== by 0x6DDA0A: dtrace_execute_internal (in /usr/bin/php5)
==16976== by 0x79DA64: ??? (in /usr/bin/php5)
==16976== by 0x717797: execute_ex (in /usr/bin/php5)
==16976== by 0x6DD908: dtrace_execute_ex (in /usr/bin/php5)
==16976== Address 0x8 is not stack'd, malloc'd or (recently) free'd
==16976==
==16976==
==16976== Process terminating with default action of signal 11 (SIGSEGV)
==16976== Access not within mapped region at address 0x8
==16976== at 0x6A7A4E: php_stream_context_get_option (in /usr/bin/php5)
==16976== by 0x7975276: php_mongo_io_stream_connect (io_stream.c:186)
==16976== by 0x798542A: mongo_connection_create (connections.c:88)
==16976== by 0x7987643: mongo_get_connection_single (manager.c:94)
==16976== by 0x79878E0: mongo_get_connection_multiple (manager.c:411)
==16976== by 0x79886FD: mongo_get_read_write_connection (manager.c:553)
==16976== by 0x795F8C1: php_mongo_connect (mongoclient.c:357)
==16976== by 0x796009D: php_mongo_ctor (mongoclient.c:571)
==16976== by 0x6DDA0A: dtrace_execute_internal (in /usr/bin/php5)
==16976== by 0x79DA64: ??? (in /usr/bin/php5)
==16976== by 0x717797: execute_ex (in /usr/bin/php5)
==16976== by 0x6DD908: dtrace_execute_ex (in /usr/bin/php5)
==16976== If you believe this happened as a result of a stack
==16976== overflow in your program's main thread (unlikely but
==16976== possible), you can try to increase the size of the
==16976== main thread stack using the --main-stacksize= flag.
==16976== The main thread stack size used in this run was 10485760.
==16976==
==16976== HEAP SUMMARY:
==16976== in use at exit: 3,607,507 bytes in 18,143 blocks
==16976== total heap usage: 19,398 allocs, 1,255 frees, 3,836,272 bytes allocated
==16976==
==16976== LEAK SUMMARY:
==16976== definitely lost: 0 bytes in 0 blocks
==16976== indirectly lost: 0 bytes in 0 blocks
==16976== possibly lost: 0 bytes in 0 blocks
==16976== still reachable: 3,607,507 bytes in 18,143 blocks
==16976== suppressed: 0 bytes in 0 blocks
==16976== Rerun with --leak-check=full to see details of leaked memory
==16976==
==16976== For counts of detected and suppressed errors, rerun with: -v
==16976== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Speicherzugriffsfehler
Without SSL Connection the Script and mongoDB works fine.