Bug #80879 [Opn->Spm]: SSL_read on shutdown, ftp/proc_open

From: Date: Thu, 18 Mar 2021 01:48:45 +0000
Subject: Bug #80879 [Opn->Spm]: SSL_read on shutdown, ftp/proc_open
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232841@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80879&edit=1 ID: 80879 Updated by: stas@php.net Reported by: gajowy at agzeta dot pl Summary: SSL_read on shutdown, ftp/proc_open -Status: Open +Status: Spam Type: Bug Package: FTP related Operating System: Windows 10 64-bit PHP Version: 8.0.3 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2021-03-18 01:39:15] gajowy at agzeta dot pl Description: ------------ SSL_read on shutdown: No such file or directory (2) or (main): SSL_read on shutdown: Invalid argument (22) warining messages are issued if ftp code is executed after proc_open. Strange, that error is trigerred even if ftp-related code is run succesfully (ftp_open, ftp_login, ftp_put & ftp_close). Another strange thing is that the problem only occurs if proc_open has been run beforehand. 1. If ftp code is inside a function (test script 1): warning message is issued when return to the parent function. 2. If ftp code is inside the main() function (tesct script 2): warining message is issued when script execution terminates. Test script: --------------- Test script 1 ------------- dl('ftp'); $p=proc_open('php.exe',[],$pipes,NULL,NULL,['bypass_shell'=>TRUE]); Send(); print("Last script line is here.\n"); function Send() { $ftp=ftp_ssl_connect('ftp.xxxxxxx.pl',21,10); ftp_login($ftp, 'xxxx@xxxxxx.pl', 'password'); ftp_close($ftp); } Test script 2 ------------- dl('ftp'); $p=proc_open('php.exe',[],$pipes,NULL,NULL,['bypass_shell'=>TRUE]); $ftp=ftp_ssl_connect('ftp.kluwak.pl',21,10); ftp_login($ftp, 'uncle@platanus.pl', 'niepewnosc0'); ftp_close($ftp); print("Last script line is here.\n"); Expected result: ---------------- No warning message is issued. Actual result: -------------- Some kind of strange message warnings, like: SSL_read on shutdown: No such file or directory (2) (main): SSL_read on shutdown: Invalid argument (22) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80879&edit=1

« previous php.bugs (#232841) next »