{"id":96935,"date":"2013-12-23T22:49:21","date_gmt":"2013-12-24T03:49:21","guid":{"rendered":"http:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/uncategorized\/php-handling-file-uploads-manual.php"},"modified":"2013-12-23T22:49:21","modified_gmt":"2013-12-24T03:49:21","slug":"php-handling-file-uploads-manual","status":"publish","type":"post","link":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/mind-upload\/php-handling-file-uploads-manual.php","title":{"rendered":"PHP: Handling file uploads &#8211; Manual"},"content":{"rendered":"<p><p>If \"large files\" (ie: 50 or 100 MB) fail, check this:  <\/p>\n<p>    It may happen that your outgoing connection to the server is    slow, and it may timeout not the \"execution time\" but the    \"input time\", which for example in our system defaulted to 60s.    In our case a large upload could take 1 or 2 hours.  <\/p>\n<p>    Additionally we had \"session settings\" that should be preserved    after upload.  <\/p>\n<p>    1) You might want review those ini entries:  <\/p>\n<p>    * session.gc_maxlifetime    * max_input_time    * max_execution_time    * upload_max_filesize    * post_max_size  <\/p>\n<p>    2) Still fails? Caution, not all are changeable from the script    itself. ini_set() might fail to override.  <\/p>\n<p>    More info here:    <a href=\"http:\/\/www.php.net\/manual\/es\/ini.list.php\" rel=\"nofollow\">http:\/\/www.php.net\/manual\/es\/ini.list.php<\/a>  <\/p>\n<p>    You can see that the \"upload_max_filesize\", among others, is    PHP_INI_PERDIR and not PHP_INI_ALL. This invalidates to use    ini_set():    <a href=\"http:\/\/www.php.net\/manual\/en\/configuration.changes.modes.php\" rel=\"nofollow\">http:\/\/www.php.net\/manual\/en\/configuration.changes.modes.php<\/a>  <\/p>\n<p>    Use .htaccess instead.  <\/p>\n<p>    3) Still fails?. Just make sure you enabled \".htaccess\" to    overwrite your php settings. This is made in the apache file.    You need at least AllowOverride Options.  <\/p>\n<p><!-- Auto Generated --><\/p>\n<p>See more here:<\/p>\n<p><a target=\"_blank\" href=\"http:\/\/php.net\/manual\/en\/features.file-upload.php\" title=\"PHP: Handling file uploads - Manual\">PHP: Handling file uploads - Manual<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> If \"large files\" (ie: 50 or 100 MB) fail, check this: It may happen that your outgoing connection to the server is slow, and it may timeout not the \"execution time\" but the \"input time\", which for example in our system defaulted to 60s. In our case a large upload could take 1 or 2 hours.  <a href=\"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/mind-upload\/php-handling-file-uploads-manual.php\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"limit_modified_date":"","last_modified_date":"","_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[16],"tags":[],"class_list":["post-96935","post","type-post","status-publish","format-standard","hentry","category-mind-upload"],"modified_by":null,"_links":{"self":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts\/96935"}],"collection":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/comments?post=96935"}],"version-history":[{"count":0,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts\/96935\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/media?parent=96935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/categories?post=96935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/tags?post=96935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}