It might be the script timing out - defaults to 20 seconds

check
set_time_limit()

regards
pete



Grant Rutherford wrote:

Hi there,

I'm trying to get a file upload to work with PHP.

The file I'm attempting to upload is a 742kB pdf file, but this will have to work for files up to 50Mb of all types eventually.

The following test pages work fine if the receiving page (testdone) is saved with an html extension, but they return a "Document Contains no Data" error if it has a php extension. The inclusion or exclusion of a "MAX_FILE_SIZE" hidden field does not seem to effect the situation.

In addition, the upload appears to work fine for smaller files. (239kB works fine on both .php and .html)

I'm using PHP with apache viewed on Mozilla, and the following simple HTML:

teststart.html:
<HTML><HEAD><TITLE>Test Page</TITLE></HEAD>
<BODY>
<H1 ALIGN=CENTER>Test Page</H1>
<FORM ACTION='testdone.***' METHOD=POST NAME=aform ENCTYPE='multipart/form-data'>
<P ALIGN=CENTER><INPUT TYPE=FILE NAME=testfile><INPUT TYPE=SUBMIT NAME=add VALUE='Submit'></P>
</FORM>
</BODY>
</HTML>


testdone.***:
<HTML><HEAD><TITLE>Test Page</TITLE></HEAD>
<BODY>
<H1 ALIGN=CENTER>Test Page</H1>
<P ALIGN=CENTER>File Upload Successful</P>
</BODY>
</HTML>


The parts of my php.ini file that I think may be relevant are:


memory_limit = 80M
post_max_size = 10000M
file_uploads = On
upload_max_filesize = 10000M

Any help would be appreciated

Thanks,
Grant





-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to