Increasing upload file limits ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony B

    Increasing upload file limits ?

    My hosting company has a default 2M limit on file uploads.
    I tried to override this using .htaccess containing line
    php_value upload_max_file size 8388608
    But placing this in the upload script folder causes apache errors when
    serving scripts in that folder. The error states something like "php_value
    not recognized as valid"
    In the end I created a php.ini file containing line
    upload_max_file size = 8M
    which I placed in the folder containing the upload script.
    This works ok but why ? I cannot find any reference to using this approach
    to override global php.ini directives ?


  • Michael Fesser

    #2
    Re: Increasing upload file limits ?

    ..oO(Tony B)
    >My hosting company has a default 2M limit on file uploads.
    >I tried to override this using .htaccess containing line
    >php_value upload_max_file size 8388608
    >But placing this in the upload script folder causes apache errors when
    >serving scripts in that folder. The error states something like "php_value
    >not recognized as valid"
    PHP directives in the .htaccess are only possible if PHP is installed as
    a server module. With (Fast)CGI this won't work.
    >In the end I created a php.ini file containing line
    >upload_max_fil esize = 8M
    >which I placed in the folder containing the upload script.
    >This works ok but why ? I cannot find any reference to using this approach
    >to override global php.ini directives ?
    Some hosts allow a custom php.ini, usually placed in the document root
    or one level above.

    Micha

    Comment

    • Jerry Stuckle

      #3
      Re: Increasing upload file limits ?

      Tony B wrote:
      My hosting company has a default 2M limit on file uploads.
      I tried to override this using .htaccess containing line
      php_value upload_max_file size 8388608
      But placing this in the upload script folder causes apache errors when
      serving scripts in that folder. The error states something like "php_value
      not recognized as valid"
      In the end I created a php.ini file containing line
      upload_max_file size = 8M
      which I placed in the folder containing the upload script.
      This works ok but why ? I cannot find any reference to using this approach
      to override global php.ini directives ?
      >
      >
      >
      What are you actually putting in the .htaccess file?


      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Tony B

        #4
        Re: Increasing upload file limits ?

        "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
        news:g5i1ou$k9k $1@registered.m otzarella.org.. .
        Tony B wrote:
        >My hosting company has a default 2M limit on file uploads.
        >I tried to override this using .htaccess containing line
        >php_value upload_max_file size 8388608
        >But placing this in the upload script folder causes apache errors when
        >serving scripts in that folder. The error states something like
        >"php_value not recognized as valid"
        >In the end I created a php.ini file containing line
        >upload_max_fil esize = 8M
        >which I placed in the folder containing the upload script.
        >This works ok but why ? I cannot find any reference to using this
        >approach to override global php.ini directives ?
        >
        What are you actually putting in the .htaccess file?
        >
        php_value upload_max_file size 8388608
        is the only text in the file.

        Tony


        Comment

        • Jerry Stuckle

          #5
          Re: Increasing upload file limits ?

          Tony B wrote:
          "Jerry Stuckle" <jstucklex@attg lobal.netwrote in message
          news:g5i1ou$k9k $1@registered.m otzarella.org.. .
          >Tony B wrote:
          >>My hosting company has a default 2M limit on file uploads.
          >>I tried to override this using .htaccess containing line
          >>php_value upload_max_file size 8388608
          >>But placing this in the upload script folder causes apache errors when
          >>serving scripts in that folder. The error states something like
          >>"php_value not recognized as valid"
          >>In the end I created a php.ini file containing line
          >>upload_max_fi lesize = 8M
          >>which I placed in the folder containing the upload script.
          >>This works ok but why ? I cannot find any reference to using this
          >>approach to override global php.ini directives ?
          >What are you actually putting in the .htaccess file?
          >>
          php_value upload_max_file size 8388608
          is the only text in the file.
          >
          Tony
          >
          >
          >
          Tony,

          It looks OK. Sounds like your host has disabled it in the .htaccess
          file. They obviously don't want you uploading large files via http.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          Working...