PHP file upload limits

1 reply [Last post]
philipnorton42's picture
Offline
Joined: 04/04/2010

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

<?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';

These will print the following informaiton (more or less):

Max Upload Filesize: 2M
Max Post Size: 8M
Number of concurrent file uploads allowed: 1
Memory limit: 256M
Max execution time: 300 seconds
Maximum input time: 60 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
Thanx

You Are A life Saver

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

Noaman

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6> <pre> <span> <p> <br />
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.