Deactivating package doesn't work

Hallo!

I wanted to deactivate a package on our test server and it says:

sh: 1: %PHP_BINDIR%/php: not found

Type: Neos\Flow\Core\Booting\Exception\SubProcessException
Code: 1355480641
File: Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php
Line: 612

Open Data/Logs/Exceptions/20171123105407b18c2a.txt for a full stack trace.

The exception contains the following:

Exception #1355480641 in line 300 of /var/www/neos/Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php: sh: 1: %PHP_BINDIR%/php: not found

13 Neos\Flow\Core\Booting\Scripts::executeCommand(“neos.flow:core:compile”, array|16|)
12 Neos\Flow\Core\Booting\Scripts::initializeProxyClasses(Neos\Flow\Core\Bootstrap)
11 call_user_func(array|2|, Neos\Flow\Core\Bootstrap)
10 Neos\Flow\Core\Booting\Step::__invoke(Neos\Flow\Core\Bootstrap)
9 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
8 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
7 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
6 Neos\Flow\Core\Booting\Sequence::invokeStep(Neos\Flow\Core\Booting\Step, Neos\Flow\Core\Bootstrap)
5 Neos\Flow\Core\Booting\Sequence::invoke(Neos\Flow\Core\Bootstrap)
4 Neos\Flow\Cli\CommandRequestHandler::boot(“Runtime”)
3 Neos\Flow\Cli\CommandRequestHandler::handleRequest()
2 Neos\Flow\Core\Bootstrap::run()
1 require(“/var/www/neos/Packages/Framework/Neos.Flow/Scripts/flow.php”)

I executed the following command:

./flow flow:package:deactivate Flowpack.SearchPlugin

By the way, Neos / Flow generates folders like “%FLOW_PATH_DATA%Logs” (root) or “%FLOW_PATH_DATA%Persistent” (Web). They also exist on my local system. Where do they come from? It looks like a variable wasn’t correctly resolved.

Specs
Neos 3.2.0
Nginx 1.10.3
PHP 7.0.22

That’s very odd and the error message also shows that the variable PHP_BINDIR hasn’t been resolved. Could you please take a look at the file in Data/Temporary/{Context}/Configuration and check if it also includes the variables?
It should for example contain under Neos => Flow => log => systemLogger => backendOptions => logFileURL the value
(defined('FLOW_PATH_DATA') ? constant('FLOW_PATH_DATA') : null) . 'Logs/System_Development.log'.

I’d guess your configuration file instead contains '%FLOW_PATH_DATA%Logs/System_Development.log', which would hint at the according replacement pattern not matching. In that case it would be good to know if there is a special encoding in the file or in your source Configuration files, or if anything else looks suspicious.

Hi Alexander,
the configuration file looks fine, it contains the constants and not the %-string

      'systemLogger' => 
      array (
        'logger' => 'Neos\\Flow\\Log\\Logger',
        'backend' => 'Neos\\Flow\\Log\\Backend\\FileBackend',
        'backendOptions' => 
        array (
          'logFileURL' => (defined('FLOW_PATH_DATA') ? constant('FLOW_PATH_DATA') : null) . 'Logs/System_Development.log',
          'createParentDirectories' => true,
          'severityThreshold' => (defined('LOG_DEBUG') ? constant('LOG_DEBUG') : null),
          'maximumLogFileSize' => 10485760,
          'logFilesToKeep' => 1,
          'logMessageOrigin' => false,
        ),
      ),

No there’s no special encoding and nothing suspicious. The files are all UTF-8 encoded.

Okay, that looks indeed correct so far. Can you please check what the output is if you just echo out the result of that constant('FLOW_PATH_DATA') call? Optimally put it somewhere early in the bootstrap.

The FLOW_PATH_DATA seems to be ok. I don’t think that this is a permanently problem. It seems to happen in between sometimes. But I can’t reproduce it, I can’t see that a single command or action is responsible for it. The %-directories are also empty and everything is at the right place. When I delete the %-directories they won’t re-appear immediately.