Google Answers Logo
View Question
 
Q: PHP/Apache File Upload Problem ( No Answer,   0 Comments )
Question  
Subject: PHP/Apache File Upload Problem
Category: Computers > Programming
Asked by: g8z-ga
List Price: $20.00
Posted: 11 Jun 2003 00:18 PDT
Expires: 11 Jun 2003 09:54 PDT
Question ID: 215924
Hello,

I am setting up my own Windows 2000 server, using PHP 4.3 and Apache
1.3, and everything works except for file uploads.

In my php.ini file, I have set file_uploads to be On, and set
upload_max_filesize and post_max_size to 10M, and the MAX_FILE_SIZE
hidden form variable is set to 100K. Essentially, I feel like I've
gone through all the most obvious checks and my files still won't
take. They do load *partially*, but they get truncated.

To illustrate the problem, I've created a test form (test.php) which
is a basic upload form. After uploading a file, the script will read
the raw upload data and print the data to the screen. You will see
that all uploaded images are truncated.


Here is the test form that I'm using:

http://67.123.112.52/home/test.php

The source PHP code to this form can be viewed at:

http://67.123.112.52/home/test.txt

The phpinfo() for this PHP installation can be viewed at:

http://67.123.112.52/info.php


I just need someone to give me a few more possibilities that I can
investigate to get this working. I know that without direct access to
the server it is difficult to debug this problem, so if a researcher
needs me to perform some tests on the server I would be happy to do
so. It's extremely urgent that I get file uploads on this server
working as quickly as possible.

Thanks,
Darren

Request for Question Clarification by sgtcory-ga on 11 Jun 2003 06:26 PDT
Hello g8z,

Are you uploading only images?

Thanks for the clarification -
SgtCory

Clarification of Question by g8z-ga on 11 Jun 2003 09:54 PDT
hi,

no, I'm uploading everything from Word documents to PDFs to images.
But I figured it out myself: I just needed to add the "b" flag to
fopen to force binary mode.

Thanks anyway,
Darren
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy