Skip to content

API Breakage: php_base64_encode No Longer Exported in php8ts.dll #18135

@mitkonikov

Description

@mitkonikov

Description

In PHP 8.4.5 (and possibly earlier versions), php_base64_encode is no longer exported from php8ts.dll. While the function still exists, it has been made static, meaning extensions that rely on it as an exported symbol (in my example, the MongoDB extension) failed to run.

Here's a reference in the code:

PHPAPI extern zend_string *php_base64_encode_ex(const unsigned char *, size_t, zend_long flags);
PHPAPI extern zend_string *php_base64_decode_ex(const unsigned char *, size_t, bool);
static inline zend_string *php_base64_encode(const unsigned char *str, size_t len) {

Would it be possible to restore the export of php_base64_encode, or should affected extensions downstream switch to php_base64_encode_ex instead? As far as I can see, this breakage happened between 8.3.0 and 8.4.0 (minor versions), I would guess it's best to fix it in the PHP repository.

PHP Version

PHP 8.4.5

Operating System

Windows 11

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