473,322 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Ubuntu7.10+Apache2+PHP5 Files not uploading...

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="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

--------------------------------------
(upload_file.php)
<?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.
Mar 24 '08 #1
2 1879
Here is the output I get from attempting to post a small JPEG file.

Upload: gdg.jpg
Type: image/jpeg
Size: 14.5869140625 Kb
Stored in: /tmp/phpJCyUQl


And unfortunately the file (/tmp/phpJCyUQl) doesn't exist.

Any help would be appreciated.
Mar 24 '08 #2
satas
82
/tmp/phpJCyUQl is a temporary name for uploaded file. You have to copy() it to other place.
Read this:
http://php.net/manual/en/features.file-upload.php
Mar 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: michael newport | last post by:
I did the following as instructed in the docs. (see below) everything seemed to install ok and I started apache with no complaints, but, 1)I do not see a process for apache using ps -ef 2) In...
2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
1
by: Mike | last post by:
Last weekend I decided to install Apache 2.0.53-win32-x86-no_ssl PHP 5.0.3 Smarty 2.6.7 MySQL essential-4.1.10-win32 I have Apache up (Port 80 blocked at the router and firewall!) and I have...
0
by: furious_radish | last post by:
I have been trying to use php5's xml support. My OS is Ubuntu 5.10 I am running apache2 with php5, no problems there. I installed the php5-xsl package but when I use any xsl related functions...
0
by: TheClair | last post by:
Hi, I'm trying to install php5 as a shared module for Apache 2 (on SuSe 10.0). When I compile I don't get libphp5.so. I don't know why, I'm not getting any errors, there are a few warnings, but...
1
by: Raul Elms | last post by:
Hi, I'm running Apache2 together with the php and mysql modules on an opensuse 10.1 machine. Most scripts run well, I can connect and query databases without any problems. But some well known...
1
by: tiboux | last post by:
I try to compil Php5.2.0 on by solaris box (SunOS 5.10 Generic_118855-14 i86pc i386 i86pc) configure and make are ok make install result is more problematic : Installing PHP SAPI module: ...
12
by: Alan M Dunsmuir | last post by:
After having worked with Apache/MySQL/PHP for a year or so under Linux I need, purely for convenience, to set up a parallel platform under Windows. Unfortunately, since I last did this (using...
16
by: Lawrence Krubner | last post by:
To guard against our users possibly uploading huge files, I've got this in my php.ini file: ; Maximum size of POST data that PHP will accept. post_max_size = 10M On a server running Ubuntu...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.