Skip to content

detect when open_basedir causes php_binary_path to be ignored in system report #1256

@nxmndr

Description

@nxmndr

Hello.

Despite setting the value php_binary_path = "/usr/bin/php8.2" (to our standard, ELF executable, not a symlink, PHP binary), and clearing the cache as per the doc, the value of "PHP Found Binary" in diagnostics remains : /usr/bin/php -q (which FTR is 7.2 and for now cannot be updated for compatibility with other websites).

I ran wp shell to see what the findPhpBinarymethod would give and it works :

include_once WP_PLUGIN_DIR . '/matomo/app/matomo.php'
$c = new \Piwik\CliMulti\CliPhp;
$c->findPhpBinary(); // "/usr/bin/php8.2"

Out of ideas, I also defined php_binary_path in other "ini" files (config/common.config.ini.php and app/config/global.ini.php), in the [General] section and cleared cache, without result.

/usr/bin/php8.2 -r "echo php_sapi_name();" # cli

We have full access on this server, so there is no hosting provider limitations. I can check any file.

Versions :

  • PHP : 8.2.26
  • WP : 6.7.2
  • Matomo : 5.2.0

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions