无法上传75 kb以上的图片 [英] Cannot upload image above 75 kb

查看:87
本文介绍了无法上传75 kb以上的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器上成功上传了70 kb以下的图像.管理服务器cpanel视图已设置php.ini文件

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文件一切正常.

n php.ini file everything is ok.

我的问题超过70kb图像无法移动临时目录 我不能理解我使用zend框架和Java脚本使用

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

有时100和100 kb以上的kb图像文件再次成功上传 我曾尝试在错误显示后上传图片

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

推荐答案

此错误与上传大小无关,相反,Zend尝试在呈现某些内容后打印标题(可能是因为存在错误并且正在尝试重定向).检查您的视图控制器中可能已经输出的任何内容.文件末尾的空白很容易错过-实际上,出于这个原因,最好不要在文件末尾使用封闭的PHP标记?>.

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.

这篇关于无法上传75 kb以上的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆