Jump to content

file uploads and $POST


babiez4sale

Recommended Posts

post_max_size integer

Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. <form action="edit.php?processed=1">, and then checking if $_GET['processed'] is set.

 

As part of your upload error checking logic, you should test for empty $_FILES/$_POST arrays.

Ok I fixed those values in php.ini, but for some reason, only memory_limit seems to be changed.  when I view the actual .ini file, I can see the values that I've set for memory_limit, post_max_size, and upload_max_size, but those values don't seem to apply.  Using phpinfo(), I can see I'm editing the correct .ini at /etc/php5/apache2/php.ini, and after restarting the apache server, memory_limit changes to my specified value, but post and upload max size remain at the php default values of 8M and 2M respectively.  Any idea on why this would be?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.