I have the following form:
<form method="post" action="./action.php?a=create" enctype="multipart/form-data">
<input name="formType" type="hidden" value="file" required />
<input name="formParent" type="hidden" value="<?php echo $parentID; ?>" required />
<table class="fixed">
<tr>
<td>
<p>Display Name</p>
</td>
<td>
<input name="formName" type="text" placeholder="Enter File Name" autofocus autocomplete="off" required />
</td>
</tr>
<tr>
<td>
<p>Select a File</p>
</td>
<td>
<input name="formFile" type="file" placeholder="Select a File" required />
</td>
</tr>
<tr>
<td></td>
<td>
<button class="confirm btn-warning" type="submit">Submit</button>
</td>
</tr>
</table>
</form>
When I attempt to upload a file to my server, say less than 20MB, it works perfectly fine. But when I attempt to upload a larger file, say 1GB, that my $_POST
data isn't set.
How can I tell my post data isn't set?
When going to the action page using this form, it checks to see what formType
is set to and displays/runs accordingly. But when I attempt to upload a larger file, it says that $_POST['formType']
isn't set, although looking at the form - it clearly is.
My Current PHP.ini
config has the following different settings: upload_max_filesize = 5000M
and post_max_size = 5000M
And I have a web.config
file which states:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
<staticContent>
<mimeMap fileExtension=".zipx" mimeType="application/x-zipx-compressed" />
</staticContent>
</system.webServer>
<system.web>
<sessionState timeout="60" />
</system.web>
</configuration>
Why might it lose $_POST
data after a certain amount of time, waiting for a file to upload? Is it possible to change a form upload timeout?
EDIT:
print_r($_POST)
returns Array ( )
FILES: "; print_r($_FILES);` – Adam T Aug 05 '15 at 17:23