Can't connect to atlas cloud in local environment

Hi,

I’m seeking for help with connection to atlas cloud in PHP.
Once i setup connection and try to connect, browser ends at ERR_EMPTY_RESPONSE state.
Httpd reports segmentation fault (I’m not using Docker, but when I tried it, results were the same).
There is propably some problem with ssl, but I can’t figure it out.
I develop on Apple MacBook Pro 2020 M1, Ventura 13.4.1

Connection in php is quite straightforward:

$serverApi = new ServerApi((string) ServerApi::V1);
$client = new Client(
	$this->config->getUri(), /* mongodb+srv://***.lukcgrv.mongodb.net/?retryWrites=true&w=majority */
	array_filter([
		'username' => $this->config->getUsername(),
		'password' => $this->config->getPassword(),
		'ssl' => $this->config->isSsl(), /* true */
		'replicaSet' => $this->config->getReplicaSet(),
		'authSource' => $this->config->getAuthSource(),
	]),
	[
		'serverApi' => $serverApi,
	],
);

Httpd debug trace:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               httpd [12053]
Path:                  /usr/local/Cellar/httpd/2.4.57_1/bin/httpd
Identifier:            httpd
Version:               ???
Code Type:             X86-64 (Translated)
Parent Process:        httpd [98644]
Responsible:           phpstorm [1274]
User ID:               501

Date/Time:             2023-10-05 13:24:06.4667 +0200
OS Version:            macOS 13.4.1 (22F82)
Report Version:        12
Anonymous UUID:        EAB7E662-3FD5-568A-FC6B-286DDAF363DE

Sleep/Wake UUID:       27EFD934-DEBF-46AD-A931-7D338A8FE905

Time Awake Since Boot: 230000 seconds
Time Since Wake:       2296 seconds

System Integrity Protection: enabled

Crashed Thread:        2

Exception Type:        EXC_CRASH (SIGSEGV)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   httpd [12053]

Application Specific Information:
*** multi-threaded process forked ***
crashed on child side of fork pre-exec


Thread 0::  Dispatch queue: com.apple.root.user-interactive-qos
0   <translation info unavailable>	       0x102cb0e24 ???
1   <translation info unavailable>	       0x102cb0e08 ???
2   libsystem_platform.dylib      	    0x7ff815ab8603 _sigtramp + 51
3   libdispatch.dylib             	    0x7ff8158fc847 dispatch_apply + 45
4   CoreFoundation                	    0x7ff815c81203 __103-[CFPrefsSearchListSource synchronouslySendSystemMessage:andUserMessage:andDirectMessage:replyHandler:]_block_invoke.75 + 95
5   CoreFoundation                	    0x7ff815b202e6 CFPREFERENCES_IS_WAITING_FOR_SYSTEM_AND_USER_CFPREFSDS + 74
6   CoreFoundation                	    0x7ff815c805fa -[CFPrefsSearchListSource synchronouslySendSystemMessage:andUserMessage:andDirectMessage:replyHandler:] + 181
7   CoreFoundation                	    0x7ff815b1ec17 -[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:] + 220
8   CoreFoundation                	    0x7ff815b1e94c -[CFPrefsSearchListSource alreadylocked_getDictionary:] + 391
9   CoreFoundation                	    0x7ff815b1e510 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 150
10  CoreFoundation                	    0x7ff815b1e45f -[CFPrefsSource copyValueForKey:] + 47
11  CoreFoundation                	    0x7ff815b1e418 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32
12  CoreFoundation                	    0x7ff815b16e14 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 361
13  CoreFoundation                	    0x7ff815c81999 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 374
14  CoreFoundation                	    0x7ff815b1674e -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 137
15  CoreFoundation                	    0x7ff815b1668d _CFPreferencesCopyAppValueWithContainerAndConfiguration + 101
16  Security                      	    0x7ff818309e57 __SSLCreateContextWithRecordFuncs_block_invoke + 35
17  libdispatch.dylib             	    0x7ff8158ea033 _dispatch_client_callout + 8
18  libdispatch.dylib             	    0x7ff8158eb267 _dispatch_once_callout + 20
19  Security                      	    0x7ff818309c1c SSLCreateContextWithRecordFuncs + 443
20  Security                      	    0x7ff818309998 SSLCreateContext + 23
21  mongodb.so                    	       0x114195cf6 mongoc_stream_tls_secure_transport_new + 518 (mongoc-stream-tls-secure-transport.c:705)
22  mongodb.so                    	       0x11419df00 _mongoc_topology_scanner_node_setup_stream_for_tls + 39 (mongoc-topology-scanner.c:862) [inlined]
23  mongodb.so                    	       0x11419df00 _mongoc_topology_scanner_tcp_initiate + 128 (mongoc-topology-scanner.c:894)
24  mongodb.so                    	       0x11413f75c _mongoc_async_cmd_phase_initiate + 12 (mongoc-async-cmd.c:273)
25  mongodb.so                    	       0x11413f227 mongoc_async_cmd_run + 71 (mongoc-async-cmd.c:115)
26  mongodb.so                    	       0x11413eed3 mongoc_async_run + 403 (mongoc-async.c:94)
27  mongodb.so                    	       0x11419e851 mongoc_topology_scanner_work + 17 (mongoc-topology-scanner.c:1304)
28  mongodb.so                    	       0x11419891d mongoc_topology_scan_once + 104 (mongoc-topology.c:900) [inlined]
29  mongodb.so                    	       0x11419891d _mongoc_topology_do_blocking_scan + 141 (mongoc-topology.c:926)
30  mongodb.so                    	       0x114198e72 mongoc_topology_select_server_id + 1026 (mongoc-topology.c:1217)
31  mongodb.so                    	       0x114198a18 mongoc_topology_select + 24 (mongoc-topology.c:1000)
32  mongodb.so                    	       0x114147685 mongoc_client_select_server + 117 (mongoc-client.c:2902)
33  mongodb.so                    	       0x1142064a3 php_phongo_manager_select_server + 47 (Manager.c:228) [inlined]
34  mongodb.so                    	       0x1142064a3 zim_MongoDB_Driver_Manager_selectServer + 227 (Manager.c:704)
35  xdebug.so                     	       0x11056525a xdebug_execute_internal + 618
36  libphp.so                     	       0x10d6341d3 ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER + 316
37  libphp.so                     	       0x10d617eaf execute_ex + 35
38  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
39  libphp.so                     	       0x10d63423c ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER + 421
40  libphp.so                     	       0x10d617eaf execute_ex + 35
41  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
42  libphp.so                     	       0x10d63423c ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER + 421
43  libphp.so                     	       0x10d617eaf execute_ex + 35
44  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
45  libphp.so                     	       0x10d63423c ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER + 421
46  libphp.so                     	       0x10d617eaf execute_ex + 35
47  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
48  libphp.so                     	       0x10d633f7b ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER + 451
49  libphp.so                     	       0x10d617eaf execute_ex + 35
50  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
51  libphp.so                     	       0x10d63423c ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER + 421
52  libphp.so                     	       0x10d617eaf execute_ex + 35
53  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
54  libphp.so                     	       0x10d633f7b ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER + 451
55  libphp.so                     	       0x10d617eaf execute_ex + 35
56  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
57  libphp.so                     	       0x10d633f7b ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER + 451
58  libphp.so                     	       0x10d617eaf execute_ex + 35
59  xdebug.so                     	       0x110564e64 xdebug_execute_ex + 692
60  libphp.so                     	       0x10d6180ce zend_execute + 367
61  libphp.so                     	       0x10d5fc3c2 zend_execute_scripts + 272
62  libphp.so                     	       0x10d5a110f php_execute_script + 394
63  libphp.so                     	       0x10d6d0ec0 php_handler + 1234
64  httpd                         	       0x102a284cb ap_run_handler + 51
65  httpd                         	       0x102a28a95 ap_invoke_handler + 256
66  httpd                         	       0x102a5f60a ap_process_async_request + 817
67  httpd                         	       0x102a5f6a1 ap_process_request + 20
68  httpd                         	       0x102a5c46d ap_process_http_connection + 345
69  httpd                         	       0x102a397b3 ap_run_process_connection + 51
70  mod_mpm_prefork.so            	       0x10b3c7713 child_main + 1180
71  mod_mpm_prefork.so            	       0x10b3c7173 make_child + 414
72  mod_mpm_prefork.so            	       0x10b3c6b6a prefork_run + 2090
73  httpd                         	       0x102a3ba9d ap_run_mpm + 64
74  httpd                         	       0x102a2f750 main + 2400
75  dyld                          	       0x202e4441f start + 1903

Thank you for any ideas.