[PHP-DEV] Bug #14861 Updated: nlist and rawlist don`t work with ftp-daemon of Suse

2002-01-19 Thread bernd . herbold

ID: 14861
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: FTP related
Operating System: Linux and W2K
Old PHP Version: 4.0.6
PHP Version: 4.1.1
New Comment:

Hello?


Previous Comments:


[2002-01-05 07:05:07] [EMAIL PROTECTED]

Hello,

I tried to use PHP4.1.1, but there was the same Problem. Then I tried 
again to resolve the problem by my self, and it works! But I don't 
know if it is OK in connection with other FTP-server and want to use
my Script with several FTP-server on several plattforms.  I made the
following modifaktion in file ftp.c.

Line 1226:
if (*ptr == '\n' )
Line 1254:
if (ch == '\n' ) {


Can you use this for the standard? So that I can use the next Version?

Thanhs, Bernd




[2002-01-04 18:56:14] [EMAIL PROTECTED]

Please test 4.1.1 and see if the problem still exists.



[2002-01-04 17:40:11] [EMAIL PROTECTED]

Hello,

I tried to user ftp_nlist to get an directory-listing of an Suse7.1 
ftp-Server, but the function returns nothing.

I tried the same code to connect to an ftp-server on an
Windows-System.

To analyse the problem I made some printentries in the file ftp.c. I
edited 
the file in the array of line 1195. I think that here is one problem: 
the code expect \r and \n, but only retrieves \n.

Here is the code:


while ((ch = getc(tmpfp)) != EOF) {
printf(%d ,ch);
/*
if (ch == '\n'  lastch == '\r') {
*/
if (ch == '\n' ) {
*(text - 1) = 0;
printf(\nText:%s\n\n, text);
*++entry = text;
}
else {
*text++ = ch;
}
lastch = ch;
}
*entry = NULL;

if (ferror(tmpfp))
goto bail;

fclose(tmpfp);

if (!ftp_getresp(ftp) || (ftp-resp != 226  ftp-resp != 250)) {
free(ret);
return NULL;
}
printf(ret[0]:%s\n, ret[0]);
printf(ret[1]:%s\n\n, ret[1]);
return ret;


And here is the output from my PHP-Script:

X-Powered-By: PHP/4.0.6
Content-type: text/html

45 114 119 45 114 45 45 114 45 45 32 32 49 32 114 111 111 116 32 32 32
114 111 111 116 32 32 32 49 54 51 57 32 68 101 99 32 50 49 32 50 51 58
51 48 32 105 99 97 112 46 112 104 112 10 
Text:icap.php
-rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.php


45 114 119 45 114 45 45 45 45 45 32 32 49 32 98 101 114 110 100 32 32
117 115 101 114 115 32 32 49 55 49 55 32 68 101 99 32 50 49 32 50 51 58
50 57 32 107 97 108 46 112 104 112 10 
Text:9 kal.php


ret[0]::¶
ret[1]:-rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.ph

array(2) {
  [0]=
  string(4) :¶
  [1]=
  string(52) -rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.ph
}


Thanks
Bernd





Edit this bug report at http://bugs.php.net/?id=14861edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14861 Updated: nlist and rawlist don`t work with ftp-daemon of Suse

2002-01-05 Thread bernd . herbold

ID: 14861
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: FTP related
Operating System: Linux and W2K
PHP Version: 4.0.6
New Comment:

Hello,

I tried to use PHP4.1.1, but there was the same Problem. Then I tried 
again to resolve the problem by my self, and it works! But I don't 
know if it is OK in connection with other FTP-server and want to use
my Script with several FTP-server on several plattforms.  I made the
following modifaktion in file ftp.c.

Line 1226:
if (*ptr == '\n' )
Line 1254:
if (ch == '\n' ) {


Can you use this for the standard? So that I can use the next Version?

Thanhs, Bernd


Previous Comments:


[2002-01-04 18:56:14] [EMAIL PROTECTED]

Please test 4.1.1 and see if the problem still exists.



[2002-01-04 17:40:11] [EMAIL PROTECTED]

Hello,

I tried to user ftp_nlist to get an directory-listing of an Suse7.1 
ftp-Server, but the function returns nothing.

I tried the same code to connect to an ftp-server on an
Windows-System.

To analyse the problem I made some printentries in the file ftp.c. I
edited 
the file in the array of line 1195. I think that here is one problem: 
the code expect \r and \n, but only retrieves \n.

Here is the code:


while ((ch = getc(tmpfp)) != EOF) {
printf(%d ,ch);
/*
if (ch == '\n'  lastch == '\r') {
*/
if (ch == '\n' ) {
*(text - 1) = 0;
printf(\nText:%s\n\n, text);
*++entry = text;
}
else {
*text++ = ch;
}
lastch = ch;
}
*entry = NULL;

if (ferror(tmpfp))
goto bail;

fclose(tmpfp);

if (!ftp_getresp(ftp) || (ftp-resp != 226  ftp-resp != 250)) {
free(ret);
return NULL;
}
printf(ret[0]:%s\n, ret[0]);
printf(ret[1]:%s\n\n, ret[1]);
return ret;


And here is the output from my PHP-Script:

X-Powered-By: PHP/4.0.6
Content-type: text/html

45 114 119 45 114 45 45 114 45 45 32 32 49 32 114 111 111 116 32 32 32
114 111 111 116 32 32 32 49 54 51 57 32 68 101 99 32 50 49 32 50 51 58
51 48 32 105 99 97 112 46 112 104 112 10 
Text:icap.php
-rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.php


45 114 119 45 114 45 45 45 45 45 32 32 49 32 98 101 114 110 100 32 32
117 115 101 114 115 32 32 49 55 49 55 32 68 101 99 32 50 49 32 50 51 58
50 57 32 107 97 108 46 112 104 112 10 
Text:9 kal.php


ret[0]::¶
ret[1]:-rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.ph

array(2) {
  [0]=
  string(4) :¶
  [1]=
  string(52) -rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.ph
}


Thanks
Bernd





Edit this bug report at http://bugs.php.net/?id=14861edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14861 Updated: nlist and rawlist don`t work with ftp-daemon of Suse

2002-01-05 Thread Markus Fischer

On Sat, Jan 05, 2002 at 12:05:08PM -, [EMAIL PROTECTED] wrote : 
 ID: 14861
 User updated by: [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Old Status: Feedback
 Status: Open
 Bug Type: FTP related
 Operating System: Linux and W2K
 PHP Version: 4.0.6
 New Comment:
 
 Hello,
 
 I tried to use PHP4.1.1, but there was the same Problem. Then I tried 
 again to resolve the problem by my self, and it works! But I don't 
 know if it is OK in connection with other FTP-server and want to use
 my Script with several FTP-server on several plattforms.  I made the
 following modifaktion in file ftp.c.
 
 Line 1226:
   if (*ptr == '\n' )
 Line 1254:
   if (ch == '\n' ) {
 
 
 Can you use this for the standard? So that I can use the next Version?

No promise on that, but you're welcome to to some testings
with different servers as I will do and see how it works out
(but I haven't looked at this particular C code yet).

Btw, what was you're parameters passed to nlist/rawlist
(directory) or did it not matter?

- Markus

-- 
Please always Cc to me when replying to me on the lists.

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DEV] Bug #14861 Updated: nlist and rawlist don`t work with ftp-daemon of Suse

2002-01-05 Thread Bernd Herbold



No promise on that, but you're welcome to to some testings
with different servers as I will do and see how it works out
(but I haven't looked at this particular C code yet).


Btw, what was you're parameters passed to nlist/rawlist
(directory) or did it not matter?

Sorry, my english is not the best, but I hope understood it in the right
way.

The Problem I have is, that php do not work with the FTP-Server from SUE
Linux.
I think ftp_nlist would work on many other servers.
I tried to connect to an Hummingbird(Windows Exceed) server with an orginal
PHP-Interpreter, and it works. I think there is need for some modifications
at the
c-code from ftp.c.

At least I did it verry simple:
$list = ftp_nlist($connid, *);


- Markus


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14861 Updated: nlist and rawlist don`t work with ftp-daemon of Suse

2002-01-04 Thread mfischer

ID: 14861
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: FTP related
Operating System: Linux and W2K
PHP Version: 4.0.6
New Comment:

Please test 4.1.1 and see if the problem still exists.

Previous Comments:


[2002-01-04 17:40:11] [EMAIL PROTECTED]

Hello,

I tried to user ftp_nlist to get an directory-listing of an Suse7.1 
ftp-Server, but the function returns nothing.

I tried the same code to connect to an ftp-server on an
Windows-System.

To analyse the problem I made some printentries in the file ftp.c. I
edited 
the file in the array of line 1195. I think that here is one problem: 
the code expect \r and \n, but only retrieves \n.

Here is the code:


while ((ch = getc(tmpfp)) != EOF) {
printf(%d ,ch);
/*
if (ch == '\n'  lastch == '\r') {
*/
if (ch == '\n' ) {
*(text - 1) = 0;
printf(\nText:%s\n\n, text);
*++entry = text;
}
else {
*text++ = ch;
}
lastch = ch;
}
*entry = NULL;

if (ferror(tmpfp))
goto bail;

fclose(tmpfp);

if (!ftp_getresp(ftp) || (ftp-resp != 226  ftp-resp != 250)) {
free(ret);
return NULL;
}
printf(ret[0]:%s\n, ret[0]);
printf(ret[1]:%s\n\n, ret[1]);
return ret;


And here is the output from my PHP-Script:

X-Powered-By: PHP/4.0.6
Content-type: text/html

45 114 119 45 114 45 45 114 45 45 32 32 49 32 114 111 111 116 32 32 32
114 111 111 116 32 32 32 49 54 51 57 32 68 101 99 32 50 49 32 50 51 58
51 48 32 105 99 97 112 46 112 104 112 10 
Text:icap.php
-rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.php


45 114 119 45 114 45 45 45 45 45 32 32 49 32 98 101 114 110 100 32 32
117 115 101 114 115 32 32 49 55 49 55 32 68 101 99 32 50 49 32 50 51 58
50 57 32 107 97 108 46 112 104 112 10 
Text:9 kal.php


ret[0]::¶
ret[1]:-rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.ph

array(2) {
  [0]=
  string(4) :¶
  [1]=
  string(52) -rw-r-  1 bernd  users  1717 Dec 21 23:29 kal.ph
}


Thanks
Bernd





Edit this bug report at http://bugs.php.net/?id=14861edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]