This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Upload image size limit using HTTP POST to PHP.
#1
Upload image size limit using HTTP POST to PHP.
Hi guys,

I'm using HTTP POST from Javascript to PHP to upload image files. The file size limit on the local Windows WAMP server is adjustable by post_max_size = 16M and upload_max_filesize = 16M in php.ini.

However, on my Digital Ocean Ubuntu 12.04 1G 64 Bit VPS with Sentora installed the upload is limited to about 750KB.

The max_execution_time and max_input_time in /etc/php5/apache2/php.ini have been set to 360, memory_limit = 128M.

I have also set
php_value upload_max_filesize 25M
php_value post_max_size 26M
php_value memory_limit 128M
in the domain root .htaccess as per your webmail app settings.

However, the limit stays at 750KB above which PHP returns an 'unprocessable entity' error.

Any help would be much appreciated.
Thanks given by:
#2
RE: Upload image size limit using HTTP POST to PHP.
There must be another php.ini setting that disable override either in php settins or under apache configs.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Thanks given by:
#3
RE: Upload image size limit using HTTP POST to PHP.
Found it!

The upload file size limit was caused by the default settings in the Suhosin PHP security extension configuration.

suhosin.post.max_value_length and suhosin.request.max_value_length in suhosin.ini

Settings these to 16000000 fixed the problem.
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Size of DB table x_logs too big, 5.6+ M records 7rdoq 5 534 10-24-2024, 06:26 AM
Last Post: TGates
Install guide wget over http? edavidf 5 11 ,181 12-15-2020, 07:07 PM
Last Post: jibranahmed
Having both HTTP & HTTPS (Port 443 and Port 80) sites on a server dsmarter 14 46 ,312 08-22-2020, 02:49 PM
Last Post: kenzopoker1

Forum Jump:


Users browsing this thread: 6 Guest(s)