[PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.
Does anybody now, what this error message mean? I can see no mistace in my code: $mode = FTP_BINARY; $picuploadname = $picupload[$i]; $piclocalname = ../pictures/.$piclocal[$i]; ftp_put($conn_ftp,$picuploadname ,$piclocalname ,$mode); The connection is correct and the files are putted but there always appears this message. Anyone any idea? Harry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.
[snip] $mode = FTP_BINARY; $picuploadname = $picupload[$i]; $piclocalname = ../pictures/.$piclocal[$i]; ftp_put($conn_ftp,$picuploadname ,$piclocalname ,$mode); [/snip] You cannot put FTP_BINARY into a variable, it then becomes a string instead of a function directive. Cahnge to this and see if it works; ftp_put($conn_ftp,$picuploadname ,$piclocalname , FTP_BINARY); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.
That shouldnt matter, because FTP_BINARY is a constant, and therfore has a numeric, or string value. The only way FTP_BINARY would become a physical string is if there was quotes around it. As for the problem, are you sure you have the right connection open, because the error (STOR not understood) sounds like you mat not have connected to a valid FTP server? possibly or permissions? -- Luke Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] $mode = FTP_BINARY; $picuploadname = $picupload[$i]; $piclocalname = ../pictures/.$piclocal[$i]; ftp_put($conn_ftp,$picuploadname ,$piclocalname ,$mode); [/snip] You cannot put FTP_BINARY into a variable, it then becomes a string instead of a function directive. Cahnge to this and see if it works; ftp_put($conn_ftp,$picuploadname ,$piclocalname , FTP_BINARY); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.
[snip] That shouldnt matter, because FTP_BINARY is a constant, and therfore has a numeric, or string value. The only way FTP_BINARY would become a physical string is if there was quotes around it. As for the problem, are you sure you have the right connection open, because the error (STOR not understood) sounds like you mat not have connected to a valid FTP server? possibly or permissions? [/snip] If you put quotes around FTP_BINARY in the function like this ftp_put($conn_ftp,$picuploadname ,$piclocalname , FTP_BINARY); ...it will fail. The expected behaviour is that ftp_put will silently default to ASCII mode. The same happens if you put FTP_BINARY in a variable. I have confirmed this in 4.3.n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not understood.
hmm, well that sure is strange. cuz here http://au3.php.net/ftp_put someone got it working...ahh i see, they used FTP_ASCII, so its the default anyways...hmmm might be a bug, because FTP_BINARY is just a constant, so it has a numerical value, (eg 2003 (i dont think thats it)) but in theory ftp_put($conn_ftp,$picuploadname ,$piclocalname , FTP_BINARY); should be the same as ftp_put($conn_ftp,$picuploadname ,$piclocalname , 2003); so i duno :/ -- Luke Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] That shouldnt matter, because FTP_BINARY is a constant, and therfore has a numeric, or string value. The only way FTP_BINARY would become a physical string is if there was quotes around it. As for the problem, are you sure you have the right connection open, because the error (STOR not understood) sounds like you mat not have connected to a valid FTP server? possibly or permissions? [/snip] If you put quotes around FTP_BINARY in the function like this ftp_put($conn_ftp,$picuploadname ,$piclocalname , FTP_BINARY); ...it will fail. The expected behaviour is that ftp_put will silently default to ASCII mode. The same happens if you put FTP_BINARY in a variable. I have confirmed this in 4.3.n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php