php / php/php-src

Can not set LDAP_OPT_NETWORK_TIMEOUT on php 8.4

Open
#23,244 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.