|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2004-03-31 13:44 UTC] jesse dot binam at simplot dot com
 Description:
------------
When using ftp_systype() while connected to a AS/400 (V5R2M0 in my case) returns null.
Reproduce code:
---------------
<?php
$fc = ftp_connect('as400server');
$login = ftp_login($fc,'username','password');
$systype = ftp_systype($fc);
echo $systype;
?>
Expected result:
----------------
I expect the output to be
'OS/400'
Actual result:
--------------
a null value
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 06:00:01 2025 UTC | 
Please try the following patch and see if it resolves the problem. Index: ftp.c =================================================================== RCS file: /repository/php-src/ext/ftp/ftp.c,v retrieving revision 1.102 diff -u -3 -p -r1.102 ftp.c --- ftp.c 18 Mar 2004 17:12:07 -0000 1.102 +++ ftp.c 31 Mar 2004 19:37:38 -0000 @@ -394,6 +394,9 @@ ftp_syst(ftpbuf_t *ftp) return NULL; } syst = ftp->inbuf; + while (*syst == ' ') { + syst++; + } if ((end = strchr(syst, ' '))) { *end = 0; }