SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: upload file

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

    upload file

    Still i cannot upload the file size of 50 mb .I have used phpinfo as per you advice there i get the maxupload size is of 2mb How can i change it.
    Please help me.
    Arunkumar

  2. #2
    SitePoint Addict launchcode's Avatar
    Join Date
    Dec 2004
    Location
    Bristol, UK
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are two values to change, upload_max_filesize and post_max_size. They can both only be set via modifying your php.ini file directly or via an .htaccess file in the same directory as the scripts. There is no other way to change those two settings.
    Richard Davey

    Launchcode
    PHP Security Guide. Think your scripts are secure? Think again.

  3. #3
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can i do it sir,
    ArunKumar

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    Johannesburg
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you on a shared host or your own server? If its your own server, search for php.ini find upload_max_fiilesize and post_max_size and change the values to what you need. Restart server and php.

    If you don't have access to php.ini then you will have to use .htaccess which I don't know how ...

  5. #5
    SitePoint Addict launchcode's Avatar
    Join Date
    Dec 2004
    Location
    Bristol, UK
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not all servers allow setting PHP values in .htaccess files. A sample .htaccess would be as follows:

    php_value include_path .:/path/to/global/includes:/path/to/local/includes
    php_value register_globals 0
    php_value error_reporting E_ALL
    php_value display_errors 1

    Cheers,

    Rich
    Richard Davey

    Launchcode
    PHP Security Guide. Think your scripts are secure? Think again.

  6. #6
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HELLO RICH,
    I dont know what to do it with the code you have is i have to runin browser as my PHP program.
    Arun

  7. #7
    SitePoint Addict launchcode's Avatar
    Join Date
    Dec 2004
    Location
    Bristol, UK
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code above is to go in an .htaccess file - if you are not sure what they are I would ask your web host (or search on their support area) to see if they allow you to use an .htaccess file or not. Essentially it's just a plain text file (you can create it in Notepad!) that you rename to .htaccess (the . at the start is vital) and upload to the same directory on your web server as all your PHP files live in.

    I can't really offer any more advice than that because it now depends on your web host only.

    Cheers,

    Rich
    Richard Davey

    Launchcode
    PHP Security Guide. Think your scripts are secure? Think again.

  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)
    This is a duplicate thread of http://www.sitepoint.com/forums/showthread.php?t=223384 by the way.


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
  •