PHP file upload limits

2 posts / 0 new
Last post
philipnorton42's picture
Offline
Last seen: 14 hours 19 min ago
Joined: 04/04/2010 - 23:03
PHP file upload limits

I needed to print out these details so thought they might come in handy:

1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
 
echo 'Max Upload Filesize: ' . ini_get('upload_max_filesize');
echo '<br />';
echo 'Max Post Size: ' . ini_get('post_max_size');
echo '<br />';
echo 'Number of concurrent file uploads allowed: ' . ini_get('file_uploads');
echo '<br />';
echo 'Memory limit: ' . ini_get('memory_limit');
echo '<br />';
echo 'Max execution time: ' . ini_get('max_execution_time') . ' seconds';
echo '<br />';
echo 'Maximum input time: ' . ini_get('max_input_time') . ' seconds';

Useful when trying to see what is causing files to be blocked on certain hosts. Essentially, the lowest value of upload_max_filesize and post_max_size will be the biggest file you can upload. The other variables are also involved.

Anonymous (not verified)

You Are A life Saver

plz message me on facebook how to change the value of concurrent file uploads

Noaman