[PHP] Re: ftp question

2002-09-02 Thread nicos

Hi,

Your script upload the file to
/home/victor/argilent-www/sites/kodak/user_pictures/vic/
are you sure that is the correct path name? If its not, just put the entier
name and not only a part of it.

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
Victor [EMAIL PROTECTED] a écrit dans le message de news:
01c252ea$36e90160$[EMAIL PROTECTED]
 I took the scriopt from php manual and adapted it to my needs, but I get
 an error:

 Warning: ftp_put(): user_pictures/vic/: No such file or directory in
 /home/victor/argilent-www/sites/kodak/upload_picture.php on line 103

 This is the code:

 # set up basic connection
 $conn_id = ftp_connect($ftp_server);

 # login with username and password
 $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass);

 # check connection
 if ((!$conn_id) || (!$login_result)) {
 echo 'FTP connection has failed.';
 exit;
 }
 $destination = $picture_location.'/'.$f_username.'/';
 # upload the file
 $upload = ftp_put($conn_id, $destination, $picture, FTP_BINARY);

 # check upload status
 if (!$upload) {
 echo 'FTP upload has failed.';
 }

 # close the FTP stream
 ftp_close($conn_id);

 I added the destination variable so that I can easily edit the
 destination if I sweitch servers, I'm guessing the error occurs because
 php doesn't know where to take the file from?! I'm guessing here, but it
 would be nice if someone tough me a bit more about ftp with php.

 user_pictures/vic is the directory the $picture has to go in, but I
 dunno why it doesn't work.

 - Victor  www.argilent.com


 __
 Post your free ad now! http://personals.yahoo.ca



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: ftp question

2002-09-02 Thread victor

Actually, that is the correct path. Which is why I don't understand why
it's not working. And as a user I'm using myself... waitaminute, the
folders are created by the user www, and I argilent may not have write
permission, maybe that's why it's not working. I should try with a
folder I create as me to see if I can write to it.

- Victor  www.argilent.com

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 02, 2002 9:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: ftp question

Hi,

Your script upload the file to
/home/victor/argilent-www/sites/kodak/user_pictures/vic/
are you sure that is the correct path name? If its not, just put the
entier
name and not only a part of it.

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hébergement Group.
www.WorldAKT.com - Hébergement de sites Internet
Victor [EMAIL PROTECTED] a écrit dans le message de news:
01c252ea$36e90160$[EMAIL PROTECTED]
 I took the scriopt from php manual and adapted it to my needs, but I
get
 an error:

 Warning: ftp_put(): user_pictures/vic/: No such file or directory in
 /home/victor/argilent-www/sites/kodak/upload_picture.php on line 103

 This is the code:

 # set up basic connection
 $conn_id = ftp_connect($ftp_server);

 # login with username and password
 $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass);

 # check connection
 if ((!$conn_id) || (!$login_result)) {
 echo 'FTP connection has failed.';
 exit;
 }
 $destination = $picture_location.'/'.$f_username.'/';
 # upload the file
 $upload = ftp_put($conn_id, $destination, $picture, FTP_BINARY);

 # check upload status
 if (!$upload) {
 echo 'FTP upload has failed.';
 }

 # close the FTP stream
 ftp_close($conn_id);

 I added the destination variable so that I can easily edit the
 destination if I sweitch servers, I'm guessing the error occurs
because
 php doesn't know where to take the file from?! I'm guessing here, but
it
 would be nice if someone tough me a bit more about ftp with php.

 user_pictures/vic is the directory the $picture has to go in, but I
 dunno why it doesn't work.

 - Victor  www.argilent.com


 __
 Post your free ad now! http://personals.yahoo.ca



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__
Post your free ad now! http://personals.yahoo.ca

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php