|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-23 10:44 UTC] langemeijer@php.net
-Status: Open
+Status: Feedback
[2012-06-23 10:44 UTC] langemeijer@php.net
[2012-10-06 09:15 UTC] langemeijer@php.net
[2012-10-06 09:15 UTC] langemeijer@php.net
-Status: Feedback
+Status: No Feedback
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 05:00:01 2025 UTC |
Description: ------------ Connecting to a "wrong" port results in memory allocation error (which cannot be catched and php exits immediately). If using an unused port like $ret = ssh2_connect('server234.domain.de', 19); the command runs into a timeout and returns "false" (and outputs a warning "Unable to connect to server234.domain.de on port 19 in..." which is OK. If using the port 21 (where a ftp service listens) $ret = ssh2_connect('server234.domain.de', 21); I get an error: Fatal error: Allowed memory size of 335544320 bytes exhausted (tried to allocate 892678102 bytes) in D:\testSFTP.php on line 2 (see reproduceable code below) If using the port 80 (where an apache webserver listens) $ret = ssh2_connect('server234.domain.de', 80); then the php process goes to 100% cpu and I have to kill it. The last two examples should instead return "false" and output a warning. I'm using PECL 5.2.6 Win32 binaries PHP 5.2.9-1 (cli) (built: Mar 5 2009 20:02:28) Reproduce code: --------------- <?php $ret = ssh2_connect('server234.domain.de', 21); var_dump($ret); Expected result: ---------------- output should be "false" plus a warning Actual result: -------------- Fatal error: Allowed memory size of 335544320 bytes exhausted (tried to allocate 892678102 bytes) in D:\testSFTP.php on line 2