Can not set LDAP_OPT_NETWORK_TIMEOUT on php 8.4
Open
Nobody has claimed this yet.
Bug
Extension: ldap
Status: Verified
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
The following code:
$ldap=ldap_connect("ldap://127.0.0.1");
var_dump(ldap_set_option($ldap,LDAP_OPT_NETWORK_TIMEOUT,3));
'
Resulted in this output:
bool(false)
But I expected this output instead:
bool(false)
LDAP_OPT_PROTOCOL_VERSION doesn't work either.
PHP Version
PHP 8.4.24 (cli) (built: Jul 30 2026 15:23:13) (NTS)
Copyright (c) The PHP Group
Built by Ubuntu
Zend Engine v4.4.24, Copyright (c) Zend Technologies
with Zend OPcache v8.4.24, Copyright (c), by Zend Technologies
Operating System
Ubuntu 24.04
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided PHP 8.4 CLI snippet on Ubuntu 24.04 and compare ldap_set_option behavior for LDAP_OPT_NETWORK_TIMEOUT and LDAP_OPT_PROTOCOL_VERSION. The issue's expected output matches the observed output, so clarify the intended result and identify the relevant LDAP implementation before defining completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100