-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rtrim() expects parameter 1 to be string, bool given #218
Comments
Just to verify: There is no "Y" or "N" in the output. Trying to reproduce this. |
@theseer No, it directly fails with this error message, I can't even enter anything. I'm running php 7.4.0. |
Wow. |
@theseer it asks me on Travis which is using an Ubuntu VM I think as well but it doesn't error there. https://travis-ci.org/burzum/emogrifier/jobs/621774976 How can I set it up to suppress the question and just download it? |
Add |
I fired up my Win 10 VM to try this and fail to reproduce it: cmd.exe
Powershell
Works for me? I do realize we should catch the potential boolean return value but I fail to see how this can happen ;) |
I doesn't work for me. :) And I don't know why. Here is a video: https://www.dropbox.com/s/cu7gbly764qj07v/phive.mp4?dl=0 Using Phive 0.13.0 doesn't throw the error but keeps giving me trouble with the keys. Can't we completely ignore the key-check? Do I miss something on my system? I have Open SSL installed but not pgp. Is it needed as well to make thsi work? λ php .\phive-0.13.0.phar install
Phive 0.13.0 - Copyright (C) 2015-2019 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading https://phar.phpunit.de/phpunit-6.5.14.phar
Downloading https://phar.phpunit.de/phpunit-6.5.14.phar.asc
Downloading key 4AA394086372C20A
Trying to connect to keys.openpgp.org (37.218.245.50)
Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x4AA394086372C20A
Successfully downloaded key.
[WARNING] Parsing key data failed with error code 2: unlink(C:\Users\Florian\.phive\_tmp_wrk\pubring.kbx): No such file or directory
Trying to connect to keys.fedoraproject.org (140.211.169.207)
Downloading https://keys.fedoraproject.org/pks/lookup?op=get&options=mr&search=0x4AA394086372C20A
Successfully downloaded key.
[WARNING] Parsing key data failed with error code 2: unlink(C:\Users\Florian\.phive\_tmp_wrk\pubring.kbx): No such file or directory
Trying to connect to keyserver.ubuntu.com (162.213.33.8)
Successfully downloaded key.
[WARNING] Parsing key data failed with error code 2: unlink(C:\Users\Florian\.phive\_tmp_wrk\pubring.kbx): No such file or directory
Trying to connect to hkps.pool.sks-keyservers.net (209.244.105.201)
Downloading https://hkps.pool.sks-keyservers.net/pks/lookup?op=get&options=mr&search=0x4AA394086372C20A
Successfully downloaded key.
[WARNING] Parsing key data failed with error code 2: unlink(C:\Users\Florian\.phive\_tmp_wrk\pubring.kbx): No such file or directory
[ERROR] PublicKey 4AA394086372C20A not found on key servers |
Version 0.13.0 won't work (anymore) as it doesn't support the output of keys.openpgp.org - which differs in for PHIVE incompatible ways from the sks output - and has had issuss with the different output formats from GnuPG 1.x and 2.x. It doesn't even get to the point where your problem is, though.
No, that would about kill the point of using phive ;)
You do need a GNUpg installation, otherwise the gpg key can not be imported and the signature can not be verified. I don't know of any Linux/Unix OS that doesn't come with it. We might have to enhance the check on windows. I do not really have a windows installation - only a Win10-VM that I every now and then boot up to verify a problem. I have no idea how people can work with windows, imho it's unusable, but I guess I can try to make a new VM without GnuPG installed. |
@theseer I've installed https://www.gpg4win.org/ this one but this didn't change anything. If Phive would tell me that it can't find the program when I run it would be a nice to identify the problem early. |
That's not the problem, actually. I probably should have been more specific in my previous reply: Yes, you do need gnupg but the fact you can see the key information (fingerprint, email addresses and creation date) means you do have a working gnupg installation that phive found. The problem we have is that seemingly reading from It still puzzles me how that should be possible - particularly in an interactive shell. What you can try as a workaround to not have phive ask is to supply the keyid via CLI: |
We already have a check in place and it will complain if it can't find gnupg. |
Okay, that seems to be a PHP 7.4 related issue on Windows. I consider that a bug in PHP 7.4. Will talk to php internals :) |
I received the same error as OP when running Phive inside Gitlab CI using DIND (Docker-in-Docker) and PHP 7.3. I fixed the issue by passing in EDIT: Inside DIND the script runs on a customized CentOS. |
That means on top of an issue with PHP 7.4 on Windows our interactive shell detection has room for improvement ;) |
@theseer did you already create a ticket on php.net? I checked the tracker but haven't seen anything that seems to be related to this issue. |
No, didn't have time yet. Will do asap. |
Found the issue on PHP.net : https://bugs.php.net/bug.php?id=78883 |
Thanks @MacFJA. I'll keep this issue open anyhow as I think we should handle a potential I'm currently quite busy with other things but I'll try to get a new release out early upcoming week. |
- Add protection for non-interactive shell (or any error from fgets)
- Add protection for non-interactive shell (or any error from fgets)
When running phive on Windows 10, using Powershell, I'm getting the error:
rtrim() expects parameter 1 to be string, bool given
Here is the full output:
The text was updated successfully, but these errors were encountered: