Bug #80880 [NEW]: SSL_read on shutdown, ftp/proc_open
| From: | gajowy at agzeta dot pl | Date: | Thu, 18 Mar 2021 02:19:58 +0000 |
| Subject: | Bug #80880 [NEW]: SSL_read on shutdown, ftp/proc_open | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-232842@lists.php.net to get a copy of this message | ||
From: gajowy at agzeta dot pl
Operating system: Windows 10 64-bit
PHP version: 8.0.3
Package: FTP related
Bug Type: Bug
Bug description:SSL_read on shutdown, ftp/proc_open
Description:
------------
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.
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 (test script 2):
warining message is issued when script execution terminates.
Test script:
---------------
Test script 1
-------------
dl('ftp');
proc_open('php.exe',[],$pipes,NULL,NULL,['bypass_shell'=>TRUE]);
Send();
print("Last script line is here.\n");
function Send()
{
// replace ftp_server, user, password with actual values
$ftp=ftp_ssl_connect(ftp_server,21,10);
ftp_login($ftp, user, password);
ftp_close($ftp);
}
Test script 2
-------------
dl('ftp');
proc_open('php.exe',[],$pipes,NULL,NULL,['bypass_shell'=>TRUE]);
// replace ftp_server, user, password with actual values
$ftp=ftp_ssl_connect(ftp_server,21,10);
ftp_login($ftp, user, password);
ftp_close($ftp);
print("Last script line is here.\n");
Expected result:
----------------
No warning message is issued.
Actual result:
--------------
Various message warnings issued, like:
SSL_read on shutdown: No such file or directory (2)
(main): SSL_read on shutdown: Invalid argument (22)
--
Edit bug report at https://bugs.php.net/bug.php?id=80880&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80880&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80880&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80880&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80880&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80880&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80880&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80880&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80880&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80880&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80880&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80880&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80880&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80880&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80880&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80880&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80880&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80880&r=mysqlcfg