able to upload 28 meg file, yet php.ini limits posts to 10 megs. What is up with that?




To guard against our users possibly uploading huge files, I've got this in my php.ini file:

; Maximum size of POST data that PHP will accept.
post_max_size = 10M


On a server running Ubuntu Linux. The PHP version:

root@ldc310:/etc/php5/cli# php -v
PHP 5.1.6 (cli) (built: Nov 28 2007 22:52:49)

I just uploaded a 28 meg file to the server. I have a PHP script that automatically resizes the images to less than a meg. However, I was assuming that the upload should have failed, before the PHP script ever had the chance to resize the file. How do I limit how much our users can upload? I really don't want the users to have the power to upload 30 or 40 or 50 meg files.

The server does have Plesk installed, which I know, in times past, has found ways to undermine the settings in php.ini. For instance, for open_basedir, the value that gets written in the httpd.conf file, in each vhost directory, takes precedence over whatever I put in php.ini. But I've never seen Plesk undermine the importance of the post_max_size setting, nor can I imagine where Plesk might store such a conf setting if it did.

Any thoughts on what might be wrong? Are there other places some configuration data might be taking precedent?
.



Relevant Pages

  • Re: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs
    ... When you hit the upload button the browser makes a connection to the server and the PHP engine gets invoked to handle the request. ...
    (php.general)
  • Re: file upload problem
    ... I am trying to learn about uploading files with php. ... I made a simple form script and and file up load script. ... The form script gets the file name correctly and seems to pass it to the upload script correctly. ... if I echo ini_getI see ...
    (comp.lang.php)
  • Re: file upload problem
    ... I am trying to learn about uploading files with php. ... I made a simple form script and and file up load script. ... The form script gets the file name correctly and seems to pass it to the upload script correctly. ... if I echo ini_getI see ...
    (comp.lang.php)
  • Re: Cannot find page- cgiemail
    ... This depends on your host server supporting PHP files ... index files folder which has all of the other files in it. ... i have even used my host's file builder to upload each file seperately ... where do i find out what extension my mailer has? ...
    (microsoft.public.publisher.webdesign)
  • Re: able to upload 28 meg file, yet php.ini limits posts to 10 megs. What is up with that?
    ... Maximum size of POST data that PHP will accept. ... I just uploaded a 28 meg file to the server. ... assuming that the upload should have failed, ... The server does have Plesk installed, which I know, in times past, has ...
    (comp.lang.php)