phpstan icon indicating copy to clipboard operation
phpstan copied to clipboard

`proc_open` error on startup

Open jandanielcz opened this issue 3 years ago • 7 comments

Bug report

I have version 1.8.1

Running

php .\vendor\bin\phpstan analyse -c .\phpstan.neon

phpstan.neon being

parameters:
	level: 6
	checkMissingIterableValueType: false
	paths:
		- src

Produces:

Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(

In Process.php line 186:

  Unable to launch a new process: proc_open(): CreateProcess failed, error code: 2


analyse [-c|--configuration CONFIGURATION] [-l|--level LEVEL] [--no-progress] [--debug] [-a|--autoload-file AUTOLOAD-FILE] [--error-format ERROR-FORMAT] [-b|--generate-baseline [GENERATE-BASELINE]] [--allow-empty-baseline] [--memory-limit MEMORY-LIMIT] [--xdebug] [--fix] [--watch] [--pro] [--] [<paths>...]

and exits.

I am using Windows, powershell, PHP 8.1. I was running analyze before on this machine and project with success.

Thanks.

Code snippet that reproduces the problem

Probably not relevant here.

Expected output

It should analyze, I did use it later.

Did PHPStan help you today? Did it make you happy in any way?

It is not running :)

jandanielcz avatar Jul 20 '22 07:07 jandanielcz

This bug report is missing a link to reproduction at phpstan.org/try.

It will most likely be closed after manual review.

mergeable[bot] avatar Jul 20 '22 07:07 mergeable[bot]

Can you please try a previous PHPStan version and find one where it last worked? Thanks.

ondrejmirtes avatar Jul 20 '22 07:07 ondrejmirtes

Can you please try a previous PHPStan version and find one where it last worked? Thanks.

  • 1.0.0 behaves same for me
  • 0.9.0 depends on php 7, so it doesn't install

jandanielcz avatar Jul 20 '22 07:07 jandanielcz

I assume the problem is in your system configuration and not in PHPStan itself. Something about executable permissions perhaps...

ondrejmirtes avatar Jul 20 '22 07:07 ondrejmirtes

It does not work even if I remove neon config and run like this:

php vendor\bin\phpstan analyse -l 6 src

in PowerShell as Administrator.

I assume the problem is in your system configuration and not in PHPStan itself. Something about executable permissions perhaps...

Should I close this issue?

jandanielcz avatar Jul 20 '22 08:07 jandanielcz

Please figure out the cause first 😊 Think about what changed since it last worked for you.

ondrejmirtes avatar Jul 20 '22 08:07 ondrejmirtes

just guesswork: could also be some kind of security software, e.g. a antivirus or similar, which blocks the subprocess creation

staabm avatar Jul 20 '22 15:07 staabm

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Oct 23 '22 00:10 github-actions[bot]