Frustrating File Upload Error
| From: | Ron dot Herhuth at tatumpartners dot com | Date: | Wed, 02 Feb 2005 18:14:02 +0000 |
| Subject: | Frustrating File Upload Error | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25509@lists.php.net to get a copy of this message | ||
I have a form that may or may not contain a file upload. When the user
uploads a file the script works as it should. The problem is that when a
user doesn't upload a file, I get an error that reads:
"PHP Notice: No file uploaded in Unknown on line 0 PHP Warning: Cannot
send session cache limiter - headers already sent in..."
I have tried everything I can think of to keep it from erroring out...the
sample logic is here:
if($_FILES)
{
if(isset($_FILES['file_upload']) &&
$_FILES['file_upload']['name'] !="")
{
..
but the error still occurs.
I have even went so far as to try to turn off the error reporting using:
error_reporting(0);
and that didn't work either.
I am using PHP 4.2.1 under IIS
Any ideas or suggestions?
Thanks,
Ron
{