Cannot upload image above 75 kb [duplicate]

2019-09-21 15:39发布

This question is an exact duplicate of:

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条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-21 16:07

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.

查看更多
登录 后发表回答