Cannot upload image above 75 kb [duplicate]

三世轮回 提交于 2020-01-07 09:17:07

问题


I successfully uploaded an image below 70 kb on server. manage server cpanel view already set php.ini file

      max_upload =2000mb 
      max-exe-time = 300  
     max input time =600 

n php.ini file everything is ok.

My problem above 70kb image can't move temp directory i cant understand im using zend framework and java script using

Server Error log display following error

[Thu Jun 20 20:53:32 2013] [error] [client 59.164.48.115] PHP Fatal error:  Uncaught exception 'Zend_Controller_Response_Exception' with message 'Cannot send headers; headers already sent in /home/indepet/application/modules/cms/controllers/ProductController.php, line 1' in /home/indepet/library/Zend/Controller/Response/Abstract.php:321\nStack trace:\n#0 /home/indepet/library/Zend/Controller/Response/Abstract.php(148): Zend_Controller_Response_Abstract->canSendHeaders(true)\n#1 /home/indepet/library/Zend/Controller/Action/Helper/Redirector.php(223): Zend_Controller_Response_Abstract->setRedirect('/index/home', 302)\n#2 /home/indepet/library/Zend/Controller/Action/Helper/Redirector.php(301): Zend_Controller_Action_Helper_Redirector->_redirect('/index/home')\n#3 /home/indepet/library/Zend/Controller/Action/Helper/Redirector.php(381): Zend_Controller_Action_Helper_Redirector->setGotoSimple('home', 'index', NULL, Array)\n#4 /home/indepet/library/Zend/Controller/Action/Helper/Redirector.php(502): Zend_Controller_Action_Helper_Redirector->gotoSimple('home', 'index', NULL, Array)\n#5 [internal fun in /home/indepet/library/Zend/Controller/Response/Abstract.php on line 321, referer: my site name

sometimes 100 and 100 above kb image file upload successfully again i was try image upload following error show

another doubt same code work other servers successfully im using Australia server


回答1:


This error isn't related to upload size, instead Zend is trying to print headers after something has already been rendered (possibly because there's been an error and it's trying to redirect). Check for anything that may have been outputted in your view controller. White space at the end of the file is an easy one to miss - in fact, it's good practice to not use a closing PHP tag ?> at the end of the file for this reason.



来源:https://stackoverflow.com/questions/17212240/cannot-upload-image-above-75-kb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!