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.
#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
#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.


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

Forum Jump:


Users browsing this thread: 1 Guest(s)