SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member snuffles117's Avatar
    Join Date
    Jun 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation why can't i upload a file bigger size??

    hi guys, i need your help... i have a file upload script in php. its working with smaller file size but i cannot upload files with 1MB or larger size.

    what seems to be a reason for this... i was told that i have to see my php.ini but the thing is, i upload the script directly to the web server. i don't know how to look for the php.ini there...

    any help please??! Thanks in advance
    Last edited by snuffles117; Jun 14, 2007 at 01:09.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    See http://www.php.net/ftp for the information on how to upload files bigger than the file size limit. The limit is set to around 1 or 2Mb since files bigger than that can drastically slow a server if you use the extremely inefficient default upload method rather than ftp.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Member snuffles117's Avatar
    Join Date
    Jun 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks felqall

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Frankfurt/Germany
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    snuffles117 probably faces the PHP timeout (default 30 sec.) which can be adjusted inside the php.ini.

    However, fellgal's suggestion is way smarter.

  5. #5
    SitePoint Member snuffles117's Avatar
    Join Date
    Jun 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually, right now my problem is how to change the settings in the php.ini because the scripts are directly uploaded on the web server. I do not have the access to the control panel so still have to contact my boss..

  6. #6
    SitePoint Enthusiast jagat_21's Avatar
    Join Date
    Jun 2007
    Location
    Ahmedabad,India
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why can't i upload a file bigger size?

    For uploading large files using PHP Script u have to set following variables in
    php.ini file :

    max_execution_time ,
    max_input_time,
    post_max_size,
    upload_max_filesize,
    memory_limit

    Check it.....

  7. #7
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Those limits only apply to uploading files s-l-o-w-l-y using HTTP protocol. They don't apply to fast uploads with FTP protocol.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •