#22619 [Opn->Bgs]: Warning: ftp_put(): error opening in /home/jd-mason/public_html/PHP_scripts/s4.
| From: | sniper@php.net | Date: | Mon, 10 Mar 2003 16:32:22 +0000 |
| Subject: | #22619 [Opn->Bgs]: Warning: ftp_put(): error opening in /home/jd-mason/public_html/PHP_scripts/s4. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35277@lists.php.net to get a copy of this message | ||
ID: 22619
Updated by: sniper@php.net
Reported By: jordan57702 at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: FTP related
Operating System: Unix
PHP Version: 4.2.3
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2003-03-10 02:57:52] jordan57702 at hotmail dot com
This is odd to me, I am making a small FTP upload client for my
webpage.
What is odd about this, is the one that POSTS to itself doesn't work,
however the other one I have, which has EXACTLY the same php code and
is
two separate pages works. I CAN'T FIGURE THIS OUT, HELP ! !
---------- s4.php (POST TO ITSELF) ----------
<?
function upload(){
$server = "jd-mason.com";
$con = ftp_connect($server);
$user = "jd-mason";
$pass = "grammer";
ftp_login ($con, $user, $pass);
ftp_cdup($con);
ftp_pwd($con);
ftp_chdir($con, 'home/public_html/PHP_scripts/');
ftp_pwd($con);
$upload = ftp_put($con, $destination_file, $source_file, FTP_BINARY);
ftp_close($con);
};
?>
<html>
<body marginwidth=4 marginheight=4 topmargin=4 leftmargin=4
bgcolor=white vlink="#0000ff" link="#0000ff">
FILE UPLOAD
<P>
<form method=POST action="s4.php" enctype="multipart/form-data">
Source File:<input type=file name=source_file size=20><BR>
Destination File:<input type=text name=destination_file size=20><BR>
<input type=submit name=Submit value=Submit size=20 style="border: 1px
solid #0000FF"></form>
<?
if(isset($HTTP_POST_VARS[Submit])){
upload();
};
?>
</body>
</html>
---------- h.html (POST TO s4_backup.php) ----------
<html>
<body marginwidth=4 marginheight=4 topmargin=4 leftmargin=4
bgcolor=white vlink="#0000ff" link="#0000ff">
FILE UPLOAD
<P>
<form method=POST action="s4.php" enctype="multipart/form-data">
Source File:<input type=file name=source_file size=20><BR>
Destination File:<input type=text name=destination_file size=20><BR>
<input type=submit name=Submit value=Submit size=20 style="border: 1px
solid #0000FF"></form>
</body>
</html>
---------- s4_backup.php ----------
<?
$server = "jd-mason.com";
$con = ftp_connect($server);
$user = "jd-mason";
$pass = "grammer";
ftp_login ($con, $user, $pass);
ftp_cdup($con);
ftp_pwd($con);
ftp_chdir($con, 'home/public_html/PHP_scripts/');
ftp_pwd($con);
$upload = ftp_put($con, $destination_file, $source_file, FTP_BINARY);
ftp_close($con);
?>
THESE LAST TWO WORK ! ! WTF IS GOING ON !
------------------------------------------------------------------------
[2003-03-10 02:55:54] jordan57702 at hotmail dot com
This is odd to me, I am making a small FTP upload client for my
webpage. What is odd about this, is the one that POSTS to itself
doesn't work, however the other one I have, which has EXACTLY the same
php code and is two separate pages works. I CAN'T FIGURE THIS OUT, HELP
! !
---------- s4.php (POST TO ITSELF) ----------
<?
function upload(){
$server = "jd-mason.com";
$con = ftp_connect($server);
$user = "jd-mason";
$pass = "grammer";
ftp_login ($con, $user, $pass);
ftp_cdup($con);
ftp_pwd($con);
ftp_chdir($con, 'home/public_html/PHP_scripts/');
ftp_pwd($con);
$upload = ftp_put($con, $destination_file, $source_file, FTP_BINARY);
ftp_close($con);
};
?>
<html>
<body marginwidth=4 marginheight=4 topmargin=4 leftmargin=4
bgcolor=white vlink="#0000ff" link="#0000ff">
FILE UPLOAD
<P>
<form method=POST action="s4.php" enctype="multipart/form-data">
Source File:<input type=file name=source_file size=20><BR>
Destination File:<input type=text name=destination_file size=20><BR>
<input type=submit name=Submit value=Submit size=20 style="border: 1px
solid #0000FF"></form>
<?
if(isset($HTTP_POST_VARS[Submit])){
upload();
};
?>
</body>
</html>
---------- h.html (POST TO s4_backup.php) ----------
<html>
<body marginwidth=4 marginheight=4 topmargin=4 leftmargin=4
bgcolor=white vlink="#0000ff" link="#0000ff">
FILE UPLOAD
<P>
<form method=POST action="s4.php" enctype="multipart/form-data">
Source File:<input type=file name=source_file size=20><BR>
Destination File:<input type=text name=destination_file size=20><BR>
<input type=submit name=Submit value=Submit size=20 style="border: 1px
solid #0000FF"></form>
</body>
</html>
---------- s4_backup.php ----------
<?
function upload(){
$server = "jd-mason.com";
$con = ftp_connect($server);
$user = "jd-mason";
$pass = "grammer";
ftp_login ($con, $user, $pass);
ftp_cdup($con);
ftp_pwd($con);
ftp_chdir($con, 'home/public_html/PHP_scripts/');
ftp_pwd($con);
$upload = ftp_put($con, $destination_file, $source_file, FTP_BINARY);
ftp_close($con);
};
?>
THESE LAST TWO WORK ! ! WTF IS GOING ON !
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22619&edit=1