Skip to content

Is it ok for some extensions to fail to load with a PATH env var broken? #17084

@DrLightman

Description

@DrLightman

Description

I was testing on my Windows 10 dev machine with some different apache/php versions combination to be launched with a shortcut, for example:

apache 2.4.41 and php 7.4.2
apache 2.4.62 and php 8.4.1

with dirs:

c:/fbampp/php7/apache24 (apache 2.4.41)
c:/fbampp/php7/php (php 7)

c:/fbampp/php8/apache24 (apache 2.4.62)
c:/fbampp/php8/php (php 8)

While doing this my legacy path env to php dir broke, I forgot to update it, and I noticed that some extensions, not all, failed to load:

from Apache error log:

Apache server shutdown initiated...
 load dynamic library 'intl' (tried: c:/fbampp/php7/php/ext\\intl (Impossibile trovare il modulo specificato.), c:/fbampp/php7/php/ext\\php_intl.dll (Impossibile trovare il modulo specificato.)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: c:/fbampp/php7/php/ext\\pdo_pgsql (Impossibile trovare il modulo specificato.), c:/fbampp/php7/php/ext\\php_pdo_pgsql.dll (Impossibile trovare il modulo specificato.)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'sodium' (tried: c:/fbampp/php7/php/ext\\sodium (Impossibile trovare il modulo specificato.), c:/fbampp/php7/php/ext\\php_sodium.dll (Impossibile trovare il modulo specificato.)) in Unknown on line 0

c:/fbampp/php7/php/ is the actual php directory and c:/fbampp/php7/php/ext/ is full of dlls.

extension_dir = "c:/fbampp/php7/php/ext"

Adding to the env path c:/fbampp/php7/php/ fixes the issue, but I was wondering if this works as intended.
If so, it would be a lil more complicated to launch different webserver/php versions and update path accordingly with the currently selected php interpreter directory.

PHP Version

PHP 7.4.2, PHP 8.4.1

Operating System

Windows 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions