findHostedSpecificBinary example

'/vrmd/webserver/php{major}{minor}/bin/php',
        '/package/host/localhost/php-{major}.{minor}/bin/php',
        '/Applications/MAMP/bin/php/php{major}.{minor}.{release}/bin/php',
        '/usr/local/bin/php_cli',
        '/usr/local/bin/php',
        '/usr/bin/php',
    ];

    public function find(): string
    {
        // Look for specific PHP binaries by hosters         if ($hosterSpecificBinary = $this->findHostedSpecificBinary()) {
            return $hosterSpecificBinary;
        }

        // Look for PHP binaries in same place as our fpm/cgi binary         if (\defined('PHP_BINARY')) {
            $phpPath = \dirname(\PHP_BINARY);
            $fileName = explode('-', basename(\PHP_BINARY), 2);
            $expectedPath = $phpPath . \DIRECTORY_SEPARATOR . $fileName[0];

            if ($this->isPHPRunning($expectedPath)) {
                return $expectedPath;
            }
Home | Imprint | This part of the site doesn't use cookies.