Skip to content
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

[Bug]: Connection to SFTP server via phpseclib causes segmentation fault #1122

Open
buddhaCode opened this issue Oct 30, 2024 · 2 comments
Open
Labels

Comments

@buddhaCode
Copy link

buddhaCode commented Oct 30, 2024

Platform

macOS

Operating system version

macOS Sonoma 14.6.1 (23G93)

System architecture

Intel (x86)

Herd Version

1.11.2 (Build: 35)

PHP Version

No response

Bug description

Hello guys,
I'm trying to connect to a SFTP server via the Laravel storage facade. The storage facade uses Flysystem, which itself uses the phpseclib package. I use the following versions:

laravel/framework 11.27.2
league/flysystem-sftp-v3 3.29.0
phpseclib/phpseclib 3.0.42

When I am trying to connect to the server I get a segmentation fault.

I have tested PHP 8.2.25, PHP 8.3.13 and 8.4.0RC3. On the CLI a get the segmentation fault and with FPM I get a 502 Bad Gateway.

I also tested PHP 8.3.12 (cli) from Brew. With the Brew built everything works as expected.

Steps to reproduce

$sftp = new \phpseclib3\Net\SFTP('host');
$sftp->login('user', 'pass');

Relevant log output

> php artisan sftp
zsh: segmentation fault
@issuelabeler issuelabeler bot added the macOS label Oct 30, 2024
@buddhaCode
Copy link
Author

I just asked a co-worker to run my code with the apple silicon build. The silicon build has no problems with the phpseclib library.

Versions:

PHP 8.3 (8.3.12)
Herd 1.11.2
Sonoma 14.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@buddhaCode and others