php / php/php-src

Windows: Duplicate "Unable to load dynamic library" warning

Open
#12,630 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The following code:

$ php -v 
PHP Warning:  PHP Startup: Unable to load dynamic library 'ftp' (tried: ext\ftp (Das angegebene Modul wurde nicht gefunden), ext\php_ftp.dll (Falscher Parameter)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'ftp' (tried: ext\ftp (Das angegebene Modul wurde nicht gefunden), ext\php_ftp.dll (Falscher Parameter)) in Unknown on line 0
PHP 8.2.12 (cli) (built: Oct 24 2023 21:15:35) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.12, Copyright (c) Zend Technologies

$ php -v 2>/dev/null

Warning: PHP Startup: Unable to load dynamic library 'ftp' (tried: ext\ftp (Das angegebene Modul wurde nicht gefunden), ext\php_ftp.dll (Falscher Parameter)) in Unknown on line 0
PHP 8.2.12 (cli) (built: Oct 24 2023 21:15:35) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.12, Copyright (c) Zend Technologies

But I expected this output instead:

-> no warning in the output when stderr is redirected
-> one warning is propery redirected but it seems the very same warning is emitted a second time on stdout?

PHP Version

8.2.12

Operating System

windows11

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 behavior on Windows 11 with php -v and php -v 2>/dev/null, comparing the duplicate startup warning and redirected output. Trace the CLI startup and warning-output path implicated by the example; done means the warning is emitted once and follows stderr redirection as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.