Closed simonsunx closed 8 years ago
Thanks for error report! Probably it is an error in PHP. Can you please send me operation system and PHP version?
Hello, J.
Thanks to you for your linter.
Let's see: $ uname -a Linux template.rcloud 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ php -v PHP 5.5.20 (cli) (built: Dec 17 2014 15:09:12) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies with Xdebug v2.2.6, Copyright (c) 2002-2014, by Derick Rethans
I think reason is discovered in this php.ini setting: disable_functions =exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
I tried to launch linter by command:
$ ./vendor/bin/parallel-lint -p 'php -d disable_functions=""' local/
but result was the same:
'php -d disable_functions=""' is not valid PHP binary.
Some moments ago I tryed to execute
php -d disable_functions="" -f vendor/jakub-onderka/php-parallel-lint/parallel-lint.php local/
and launch was successful.
I hope my experience will be helpful.
If is proc_open disabled, an error message is shown, but I also add a check for proc_open
return code.
Thank you very much for great error report :)
Hello.
This is line 47 in https://github.com/JakubOnderka/PHP-Parallel-Lint/blob/master/src/Process/Process.php:
$this->process = proc_open($cmdLine, $descriptors, $pipes, null, null, array('bypass_shell' => true));
It was modified:
And execution returned: ------8<------ $ ./vendor/bin/parallel-lint local/ cmd=string(112) "'php' -n -r 'echo '\''PHP;'\'', PHP_VERSION_ID, '\'';'\'', defined('\''HPHP_VERSION'\'') ? HPHP_VERSION : null;'"
descriptors=array(3) { [0] => array(2) { [0] => string(4) "pipe" [1] => string(1) "r" } [1] => array(2) { [0] => string(4) "pipe" [1] => string(1) "w" } [2] => array(2) { [0] => string(4) "pipe" [1] => string(1) "w" } }
pipes=NULL
is_resource=bool(false)
process=NULL
cmd=string(115) "'php' --php -r 'echo '\''PHP;'\'', PHP_VERSION_ID, '\'';'\'', defined('\''HPHP_VERSION'\'') ? HPHP_VERSION : null;'"
descriptors=array(3) { [0] => array(2) { [0] => string(4) "pipe" [1] => string(1) "r" } [1] => array(2) { [0] => string(4) "pipe" [1] => string(1) "w" } [2] => array(2) { [0] => string(4) "pipe" [1] => string(1) "w" } }
pipes=NULL
is_resource=bool(false)
process=NULL
'php' is not valid PHP binary. ------8<------
Maybe condition «$this->process === false» needs «or» statement:
$this->process === false || !is_resource($this->process)