Ok...
I've been trying to track this down between two "similar" systems (one that appears to work and the other that doesn't)... and I'm decided to ask for help.
I have an Ubuntu 7.10 based system, with Apache2 + PHP5 installed, but when I attempt to implement even a SIMPLE file upload script, the files are not getting stored into the "/tmp" directory. I have validated that my maximum upload & post sizes are 10M... and I'm attempting to upload either a simple text file (helloworld.txt ) or a small 30kb jpeg and neither are placed into the /tmp directory. The filename for the /tmp directory is displayed from the upload_file.php script to the screen, but that file doesn't exist.
Here is an example of the scripts:
(upload.html)
<html>
<body>
<form action="upload_ file.php" method="post" enctype="multip art/form-data">
<label for="file">File name:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
--------------------------------------
(upload_file.ph p)
<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?>
------------------------------
Any ideas?
Thanks,
Clintec.
I've been trying to track this down between two "similar" systems (one that appears to work and the other that doesn't)... and I'm decided to ask for help.
I have an Ubuntu 7.10 based system, with Apache2 + PHP5 installed, but when I attempt to implement even a SIMPLE file upload script, the files are not getting stored into the "/tmp" directory. I have validated that my maximum upload & post sizes are 10M... and I'm attempting to upload either a simple text file (helloworld.txt ) or a small 30kb jpeg and neither are placed into the /tmp directory. The filename for the /tmp directory is displayed from the upload_file.php script to the screen, but that file doesn't exist.
Here is an example of the scripts:
(upload.html)
<html>
<body>
<form action="upload_ file.php" method="post" enctype="multip art/form-data">
<label for="file">File name:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
--------------------------------------
(upload_file.ph p)
<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?>
------------------------------
Any ideas?
Thanks,
Clintec.
Comment