Hi, i am having strange issues regarding file upload on my windows system. I am using windows 7 with iis7 on the server. i am trying on a client comp with local ip 10.47.47.13 and the server is 10.47.47.1. I have a very simple form which i couldnt make it work in some cases. the page stays on the wwwroot. ( http://10.47.47.1/3.php)
3.php
<?php
$source_file=$_FILES["newsimg"]["tmp_name"];
$destination_file="123.jpg";
$ftp_server="localhost";
$ftp_username="admin";
$ftp_password="apple";
if ($source_file!="") {
$mrph_connect = ftp_connect($ftp_server,21);
$mrph_login= ftp_login($mrph_connect, $ftp_username, $ftp_password);
if (($mrph_connect) && ($mrph_login)) {
$upload = ftp_put($mrph_connect, $destination_file, $source_file, FTP_BINARY);
if ($upload) echo "ok"; else echo "nok";
}
}
?>
<body>
<form enctype="multipart/form-data" action="3.php" method="POST">
<input type=file name=newsimg>
<input type=submit name=mrph>
</form>
</body>
the form calls itself to upload the file.When i select a file of size 1 or 2 KB it works but when i select a file of even 10 15KB the page timeouts after some time. i checked the php.ini settings file upload is on, i set temp folder as c:\uploads just to test. AS I SAID IT WORKS FOR FILES SIZE 1 OR 2KB BUT NOT EVEN WHEN I SELECT A FILE OF 10 OR 20KB. i even removed the php code (commented everything) to see even when nothing is done it works but it didnt.
any help would be appreciated.