I have the following html to upload files:
<?php
echo "<pre>";
var_dump($_FILES);
echo "<br />";
var_dump($_POST);
echo "</pre>";
?>
<form method="POST" ENCTYPE="multipart/form-data">
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
<td>
Selecteer een bestand:*
</td>
<td>
<input type="file" name="file" />
</td>
</tr>
<tr>
<td colspan="2">
<input style="font-size: 10pt; cursor: hand;" type="submit" name="insturen" value="Insturen">
<input style="font-size: 10pt; cursor: hand;" type="submit" name="klaar" value="Klaar met Uploaden">
</td>
</tr>
</table>
</form>
There is no problem when the file is like 190KB. But when the files get bigger (for example 20MB) the $_POST and $_FILES arrays will be totally empty.
One of the solutions i found was changing the php.ini file:
max_execution_time = 3000
max_input_time = 3000
memory_limit = 1024M
upload_max_filesize = 1024M
post_max_size = 1024M
This did not help, so i thought let’s try to change the .htaccess file:
#set php upload values
php_value upload_max_filesize 1024M
php_value post_max_size 1024M
php_value max_execution_time 3000
This didn’t do the job either. As this server runs on IIS 7.5 I have already set the maxRequestLength and maxAllowedContentLength to the correct values.
If anyone knows something that might lead me closer to my goal of uploading up to 900MB video files, please do tell. Any help is greatly appriciated!
The problem was that plesk changed from
plesk/php/php.initoplesk/php5/php.iniwhile not deleting the first one. after changing the second file all was fine.I found this by using
ini_get("extension_dir")which will tell you the location of the extensions, and in my case also which php folder it was using!thanks to Jonny Keogh for leading me in this direction (in the comments of this question)!