static-php-cli icon indicating copy to clipboard operation
static-php-cli copied to clipboard

Windows Defender SmartScreen

Open simonhamp opened this issue 1 year ago • 4 comments

The first hurdle when trying to run a compiled php.exe seems to be this

Screenshot 2024-04-24 at 13 04 11

Clicking the 'More info' link reveals this:

Screenshot 2024-04-24 at 13 04 33

Obviously, we can't expect every Windows user to disable SmartScreen. I'm guessing there's some sort of code signing that's needed to overcome this?

simonhamp avatar Apr 24 '24 17:04 simonhamp

Unfortunately I know nothing about windows executable signing. A self-signed certificate may be able to sign, but may not avoid SmartScreen. In addition, using a third-party issuance of compiled php.exe may also be a violation of the agreement?

crazywhalecc avatar Apr 25 '24 04:04 crazywhalecc

Which agreement?

simonhamp avatar Apr 25 '24 09:04 simonhamp

@simonhamp I just assumed that I used a self-signed certificate and uploaded php.exe on static-php.dev. I don't know if doing so would violate the PHP License, GPL or other specific agreements or licenses.

The problem depends on how to avoid SmartScreen. If SmartScreen can be avoided by signing (no matter who's signature), and doing so doesn't violate any agreements or licenses, that's OK.

But how to sign raises another issue. Even if I can sign, how should others sign when compiling locally using static-php? 😵‍💫

crazywhalecc avatar Apr 26 '24 02:04 crazywhalecc

Yeh I understand. I will do more digging

simonhamp avatar Apr 26 '24 03:04 simonhamp