SitePoint Sponsor

User Tag List

Results 1 to 25 of 25

Thread: File uploading

Hybrid View

  1. #1
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    File uploading

    Sir,
    I cannot upload file of size 75mb in php.Is there is limit in php it cannot upload of file size of more than 50 mb.
    Thanks in advance,
    ArunKumar

  2. #2
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Create a <?php phpinfo() ?> page.
    Any upload/post limits should be stated on there.

  3. #3
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sir,
    Where should i create phpinfo file
    ArunKumar

  4. #4
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anywhere where you can access it via a url.
    For example, if your url is http://foobar.com then create a phpinfo.php file with the following in it:
    PHP Code:
    <?php phpinfo() ?>
    Put phpinfo.php into your sites document root (where the index.php file is) and goto http://foobar.com/phpinfo.php

    Be sure to remove phpinfo.php once you're done to prevent other people from viewing it.

  5. #5
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sir,
    I cant get you,I am soory for it.The below is my code how to do i sir.

    /*********************************************************/
    <? include "pathfile.php";
    echo " <form enctype=\"multipart/form-data\" action=\"".$pathconfig."backupload.php\" method=\"POST\">\n";
    echo " Send this file: <input name=\"tst\" type=\"file\" /> \n";
    echo " <input type=\"submit\" value=\"Send file\" /> \n";
    echo " </form> \n";

    ?>
    /***********My link goes here****************************/
    if (isset($_fileS['tst']) && is_array($_fileS['tst']) && isset($_fileS['tst']['tmp_name']) && is_uploaded_file($_fileS['tst']['tmp_name'])) {
    copy($_fileS['tst']['tmp_name'], 'upload/'.$_fileS['tst']['name']);
    unlink($_fileS['tst']['tmp_name']);
    echo 'uploaded file: '.$_fileS['tst']['name'].', '.$_fileS['tst']['size'].' bytes';
    }
    ///////////////////////******************************//////////

  6. #6
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The phpinfo.php file above is a completely new file you need to create ... forget about any existing files you may currently have.
    Just create a brand new file called phpinfo.php (as above) and upload/ftp it to your host/server. Put it in the same place as your index.php file (or index.html) then goto http://yoursite.com/phpinfo.php

  7. #7
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sir,
    I am trying to uploads a rar file.

    I simply want to upload a file more that 60 mb.

    I face the same problem when downloading also.
    Thanks,
    Arunkumar

  8. #8
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, but you need to find out why you are having this problem.
    A <?php phpinfo() ?> file will show you all your PHP/Apache settings, some of those are related to uploading files, you need to check them to make sure there's no predefined file size limit.
    If you do what i suggested above and view http://yoursite.com/phpinfo.php you'll see what i mean.

  9. #9
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sir
    I doit as you said but there are more value displaying what to do it.
    Thanks,
    Arunkumar

  10. #10
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sir
    I doit as you said but there are more value displaying what to do it.
    Thanks,
    Arunkumar

  11. #11
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I presume you now see a page similar to this example one http://cirtexhosting.com/phpinfo.php ?

    If so, what are the values of:
    post_max_size
    upload_max_filesize
    ?

  12. #12
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sir,
    Ya sir,I am having it .The values are 8.

    ArunKumar

  13. #13
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    8? Hmm..that means you have a limit of 8M (and your form isn't specifying any limit).
    That means you should only be able to upload 8M files so not even sure how you can upload a 50M one

    You don't have to call be sir by the way ... that's my dad

  14. #14
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello mark,

    How can i change,Is there is anyway to change.

    And i feel very pleasure to get answer from you,And i like your last mail.

    Can I get your mail id,
    Mines is arun@bandvalley.com

    Thanks,
    Arun Kumar

  15. #15
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some hosts won't allow you to change the upload limit but you can try creating a .htaccess file.

    So .. create a new file, called .htaccess and in there put:
    php_value upload_max_filesize "100M"
    php_value post_max_size "100M"

    then upload the .htaccess file to your host, the same way you did it with the phpinfo.php file.

  16. #16
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the file extension is .htaccess
    ArunKumar

  17. #17
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's the entire file name, just .htaccess nothing else

  18. #18
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have created it bi=ut still it not working

    i have just typed what you give is there neccesarry to put $ infront of php_ value.....

  19. #19
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, you don't need the $
    Like i said, some hosts won't allow you to change it .. i'm presuming this isn't your server but a hosts?

  20. #20
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is that require put these under php tag <? ?>
    Arunkumar

  21. #21

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, this is nothing PHP specific.

  22. #22
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i saved it as

    php_value upload_max_filesize "10000M"
    php_value post_max_size "10000M"

    and file name is .htaccess and then i store it in my server diredotry where all my php prgramms are there but still i cannot upload the file

  23. #23
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    should i save these in /etc/lib
    Arun

  24. #24
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sir,
    I have changed still i cannot download it.
    ArunKumar

  25. #25
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The .htaccess goes where you originally had it (where you PHP files are .. index.php etc) not in /etc/lib
    But it looks like your host doesn't allow you to upload files over 8M to prevent people uploading massive files and clogging up their server.


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
  •