php Internal Server Error

症状

PHP在上传文件的时候出现错误Internal Server Error

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@phpStudy.net to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log.

 
诊断

上传文件的目录没有写的权限或者上传文件超过了php.ini上传文件大小限制

 
解决

1、修改下上传文件的那个目录权限,再试。
2、如果上传的文件过大就修改PHP.ini的上传文件大小限制,默认是2M。

打开Apache 的httpd.conf
找到<IfModule mod_fcgid.c>
在里面添加如下三行即可!
<IfModule mod_fcgid.c>
FcgidConnectTimeout  20
# to get around upload errors when uploading images increase the MaxRequestLen size to 15MB
 MaxRequestLen  15728640
</IfModule>

全文:http://www.hierror.com/php/201497482.shtml
posted @ 2016-05-30 14:10  stma  阅读(1173)  评论(0)    收藏  举报