Skip to content

Support Zend PHP distributions #1143

@dsmith4-godaddy

Description

@dsmith4-godaddy

Summary

The New Relic .deb files, at least, do not automatically create symlinks for Zend PHP. I propose updating the postinst script to do so. I assume this also would require modifying other scripts, and likely extending this to .rpm files as well, but I'm only worried about Ubuntu personally :)

Desired Behavior

Zend's PHP .debs create a version-specific subdirectory under /usr/lib/php (e.g. /usr/lib/php/7.4-zend/). This parallels the PHP API-specific dirs (e.g. /usr/lib/php/20210902/), which are correctly handled by the New Relic installation process.

In the absence of a suitable symlink, most PHP executions return a warning about the missing .so that's specified in my configs:

dsmith4@TESTBOX:~/p/tmp/DEBIAN$ php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'newrelic.so' (tried: /usr/lib/php/8.1-zend/newrelic.so (/usr/lib/php/8.1-zend/newrelic.so: cannot open shared object file: No such file or directory), /usr/lib/php/8.1-zend/newrelic.so.so (/usr/lib/php/8.1-zend/newrelic.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.1.33 (cli) (built: Jul  9 2025 09:07:20) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.33, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.33, Copyright (c), by Zend Technologies

My short-term fix is to create the appropriate symlink (in this case, sudo ln -s /usr/lib/newrelic-php5/agent/x64/newrelic-20210902.so /usr/lib/php/8.1-zend/newrelic.so) -- in my ideal world the NR installer/updater would take care of this for me.

This presumably would need to support all versions of PHP supported by New Relic and Zend (personally I'm only using 7.4 and 8.1 but I think Zend provides pre-built binaries for versions both older and newer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions