I have this form
<table class="table">
<div class="error"><?php if(!empty($errors))echo output_errors($errors);?></div>
<form action = "upload_music.php" method = "POST" enctype = "multipart/form-data">
<tr>
<td>Artist:</td>
<td><input type="text" name="artist" value=""></td>
</tr>
<tr>
<td>Track Name:</td>
<td><input type="text" name="track_name" value=""></td>
</tr><?php print_r($_FILES);?>
<tr>
<td>Genre:</td>
<td>
<?php
$genres = Genre:: getAllGenre();
?>
<select name = "genre">
<?php
for($i = 0 ; $i<count($genres);$i++){
?>
<option value = "<?php echo "{$i}"?>"><?php echo "{$genres[$i]['genre']}";?> </option>
<?php }
?>
</select>
</td>
</tr>
</tr>
<td>Track:</td>
<td><input type='file' name='file_path'></td>
</tr>
<tr>
<td>Track Description:</td>
<td><textarea name="track_desc" rows ="5"></textarea></td>
</tr>
<tr>
<td><input class="btn btn-success" type="submit" name = "submit" value="Upload"></td>
</tr>
<form>
</table>
Where the user will have to upload a track. every time I upload a file that is larger than 7mb the print_r($_FILES); prints an empty array. but when I upload a file that is below 8mb or an mp3 the print_r($_FILES); prints an array with values.
I am guessing that the some file is not being read by $_FILES because their size is larger than 8mb? if that’s the case How would I upload files that is larger than 8mb? also my php.ini settings with regards to POSt and FILE uploads looks like this
post_max_size = 128M
upload_max_filesize = 128M
if you guys needed an extra information I am using XAMPP.
It looks like you are looking into wrong php.ini because the default post_max_size is generally 8M.
Restart the web server and look into phpInfo()