1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Large file uploads failing...

Discussion in 'PHP' started by Exclyptic, Dec 26, 2013.

  1. Sugavanas

    Sugavanas Well-Known Member

    Messages:
    686
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    170
    #21
    the last line
     
    Sugavanas, Dec 26, 2013 IP
  2. Exclyptic

    Exclyptic Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #22
    Do I just plonk it at the bottom of the document like this?

     
    Exclyptic, Dec 26, 2013 IP
  3. Sugavanas

    Sugavanas Well-Known Member

    Messages:
    686
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    170
    #23
    yeab
     
    Sugavanas, Dec 26, 2013 IP
  4. Exclyptic

    Exclyptic Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #24
    Brilliant. I've done all steps bar the nginx related changes due to the issues. Running a test now... fingers crossed.
     
    Exclyptic, Dec 26, 2013 IP
  5. Exclyptic

    Exclyptic Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #25
    So, same issue. Chrome - This webpage is not available. It got to about 60% and failed, same as last time.
     
    Exclyptic, Dec 26, 2013 IP
  6. Sugavanas

    Sugavanas Well-Known Member

    Messages:
    686
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    170
    #26
    Sorry i went away. Did u restart all the stuffs ?

    If i am correct, the bar goes up to 60%, comes down to 0, goes up again, comes down again and shows the error right
     
    Sugavanas, Dec 26, 2013 IP
  7. Exclyptic

    Exclyptic Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #27
    Ok, I'm really close now!

    I'm now just getting a "...client intended to send too large body: 155879060 bytes..." error in the log file.

    This is because Plesk uses vhost config files that are over reading the standard configuration file. I cant seem to edit Nginx configuration for vhosts. It's something stupid with Plesk.
     
    Exclyptic, Dec 27, 2013 IP
  8. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #28
    create a file named vhost.conf and place it in your /conf directory under the appropriate domain name. Then from the shell do:

    /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

    -or-

    /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=example.com

    if the former doesn't work.

    This will add your config to the server and will not be overwritten..
     
    NetStar, Dec 28, 2013 IP
  9. DomainerHelper

    DomainerHelper Well-Known Member

    Messages:
    445
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    100
    #29
    Try using the correct php inis:

    max_execution_time = 3200
    max_input_time = 90
    memory_limit = 256M
    post_max_size = 195M
    upload_max_filesize = 200M
    Code (markup):
    In apache you would put this into php.ini in the directory you are running in. I don't know about Nginx cuz it sucks.

    $_FILES are stored on disk (Swap, Physical memory), not ram. If your script is using that much ram, optimize the script. I have never had an upload script use more than 32MB ram, not even with large videos.

    Also, it is insane to set your max upload to 1GB. Absolutely insane.
     
    Last edited: Dec 29, 2013
    DomainerHelper, Dec 29, 2013 IP
  10. Sugavanas

    Sugavanas Well-Known Member

    Messages:
    686
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    170
    #30
    Actually you need to edit nginx as well. i searched about it for hours. In plesk you need to do it i guess
     
    Sugavanas, Dec 29, 2013 IP
  11. DomainerHelper

    DomainerHelper Well-Known Member

    Messages:
    445
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    100
    #31
    You should go back to cpanel, so much easier:) Just my 2 cents though.
     
    DomainerHelper, Dec 30, 2013 IP