SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Nov 2011
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing maximum file upload size in a script?

    Can you temporarily change the php.ini settings for maximum file upload for a certain script? Much like a runtime configuration change to when errors are displayed.

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    upload_max_filesize and post_max_size: Entry can be set in php.ini, .htaccess or httpd.conf
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Addict
    Join Date
    Nov 2011
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought I responded to this earlier today but it looks like I didn't actually submit my post.

    First - thanks! Secondly, could you provide a brief demo on how to set it in .htaccess or httpd.conf? I know about php.ini, but I wanted to set it differently for just a specific script. I am not very familiar with apache yet.

  4. #4
    SitePoint Evangelist hessodreamy's Avatar
    Join Date
    Apr 2005
    Location
    uk
    Posts
    525
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    The manual suggests that you cannot change this on a script by script basis, with ini_set. Someone may put me right on this point.

  5. #5
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ShinVe View Post
    First - thanks! Secondly, could you provide a brief demo on how to set it in .htaccess or httpd.conf? I know about php.ini, but I wanted to set it differently for just a specific script. I am not very familiar with apache yet.
    http://www.php.net/manual/en/configuration.changes.php
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  6. #6
    SitePoint Addict
    Join Date
    Nov 2011
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @hessodreamy
    That's what I got from the manual as well.

    Thanks. That's going to take a while (a long while ) for me to digest.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •