Debian Jessie - Apache2 / PHP 5.6,无法上传超过128kb [英] Debian Jessie - Apache2 / PHP 5.6, can't upload more than 128kb

查看:369
本文介绍了Debian Jessie - Apache2 / PHP 5.6,无法上传超过128kb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,就是让我疯狂!我最近更新了我的服务器到Jessie(希望我没有在这一刻!),但从那以后,我无法上传超过128KB的一次上传。



我已经尝试了所有常见的明显选项 - 检查php.ini的最大文件大小,执行时间等,但没有解决方案。

  ;;;;;;;;;;;;;;; 
;文件上传;
;;;;;;;;;;;;;;;;;

;是否允许HTTP文件上传。
; http://php.net/file-uploads
file_uploads = On

; HTTP上传文件的临时目录(将使用系统默认值,如果不是
;指定)。
; http://php.net/upload-tmp-dir
; upload_tmp_dir = / var / tmp

;上传文件的最大允许大小。
; http://php.net/upload-max-filesize
upload_max_filesize = 500M

;可以通过单个请求上传的最大文件数
max_file_uploads = 50

以上是我的php.ini文件为CLI,CGI和apache2摘录。



我想不出还要检查什么。如果我尝试上传大于该值的任何东西,我可以从服务器获取500个响应,或者从我的网络浏览器中得到一个服务器意外的连接错误。问题是,如果我通过WordPress上传我得到HTTP错误,如果我尝试通过Owncloud上传我得到连接关闭。



Debian Jessie
Apache / 2.4.10(Debian)mod_fcgid / 2.3.9 PHP / 5.6.6-2 OpenSSL / 1.0.1k



Apache2错误日志看起来像这样...

  [Fri Mar 27 11:32:18.736845 2015] [mpm_prefork:notice] [pid 6012] AH00163:Apache / 2.4。 10(Debian)mod_fcgid / 2.3.9 PHP / 5.6.6-2 OpenSSL / 1.0.1k配置 - 恢复正常操作
[Fri Mar 27 11:32:18.736959 2015] [core:notice] [pid 6012 ] AH00094:命令行:'/ usr / sbin / apache2'
[Fri Mar 27 11:45:33.881783 2015] [mpm_prefork:notice] [pid 6012] AH00169:抓住SIGTERM,关闭
[ Fri 3月27日11:45:34.861896 2015] [ssl:warn] [pid 6699] AH01906:xxx:8080:0服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
[Fri Mar 27 11:45:34.862153 2015] [suexec:notice] [pid 6699] AH01232:启用suEXEC机制(包装:/ usr / lib / apache2 / suexec)
[Fri Mar 27 11:45:34.938830 2015] [auth_digest:notice] [pid 6701] AH01757:生成消化认证的秘密...
[Fri Mar 27 11:45:35.051083 2015] [ssl:warn] [pid 6701] AH01906:xxx:8080:0服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
[Fri Mar 27 11:45:35.081620 2015] [ mpm_prefork:notice] [pid 6701] AH00163:Apache / 2.4.10(Debian)mod_fcgid / 2.3.9 PHP / 5.6.6-2 OpenSSL / 1.0.1k配置 - 恢复正常操作
[Fri Mar 27 11 :45:35.081693 2015] [core:notice] [pid 6701] AH00094:命令行:'/ usr / sbin / apache2'
[Fri Mar 27 11:56:41.650574 2015] [mpm_prefork:notice] [pid 6701] AH00169:抓住SIGTERM,关闭
[Fri Mar 27 11:56:42.911897 2015] [ssl:warn] [pid 7255] AH01906:xxx:8080:0服务器证书是CA证书(BasicConstraints:CA == true!?)
[Fri Mar 27 11:56:42.912493 2015] [suexec:notice] [pid 7255] AH01232:启用suEXEC机制(包装:/ usr / lib / apache2 / suexec)
[周五马r 27 11:56:42.983533 2015] [auth_digest:notice] [pid 7257] AH01757:生成消化认证的秘密...
[Fri Mar 27 11:56:43.238951 2015] [ssl:warn] [pid 7257] AH01906:xxx:8080:0服务器证书是CA证书(BasicConstraints:CA == TRUE!?)
[Fri Mar 27 11:56:43.273995 2015] [mpm_prefork:notice] [pid 7257] AH00163 :Apache / 2.4.10(Debian)mod_fcgid / 2.3.9 PHP / 5.6.6-2 OpenSSL / 1.0.1k配置 - 恢复正常操作
[Fri Mar 27 11:56:43.274080 2015] [core:通知] [pid 7257] AH00094:命令行:'/ usr / sbin / apache2'

有没有人有任何想法或遇到类似的问题?



提前提醒

解决方案

https://www.devside.net/ wamp-server / apache-and-php-limit-and-timeout


使用PHP-FCGI(单独的PHP过程通过Apache的mod_fcgid运行), mod_fcgid caps上传到128KB默认情况下较新版本(v2.3.6及更高版本),并且通常在达到该限制时返回500服务器错误。



I've got a problem which is bugging me like crazy! I've recently updated my server to Jessie (wishing I hadn't at the moment!) but ever since I did, I can't upload more than 128KB in a single upload.

I've tried all the usual obvious options - checking php.ini for max file size, execution times, etc but with no solution.

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
;upload_tmp_dir = /var/tmp

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 500M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 50

Above is an excerpt from my php.ini files for CLI, CGI and apache2.

I can't think what else to check. If I try and upload anything larger than that, I either get a 500 response from the server or I get a "server unexpectedly dropped connection" error from my web browser. The issue means that if I upload via WordPress I get "HTTP Error" and if I try and upload via Owncloud I get "connection closed".

Debian Jessie Apache/2.4.10 (Debian) mod_fcgid/2.3.9 PHP/5.6.6-2 OpenSSL/ 1.0.1k

Apache2 error log looks like this...

[Fri Mar 27 11:32:18.736845 2015] [mpm_prefork:notice] [pid 6012] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 PHP/5.6.6-2 OpenSSL/1.0.1k configured -- resuming normal operations
[Fri Mar 27 11:32:18.736959 2015] [core:notice] [pid 6012] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 27 11:45:33.881783 2015] [mpm_prefork:notice] [pid 6012] AH00169: caught SIGTERM, shutting down
[Fri Mar 27 11:45:34.861896 2015] [ssl:warn] [pid 6699] AH01906: xxx:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 27 11:45:34.862153 2015] [suexec:notice] [pid 6699] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Fri Mar 27 11:45:34.938830 2015] [auth_digest:notice] [pid 6701] AH01757: generating secret for digest authentication ...
[Fri Mar 27 11:45:35.051083 2015] [ssl:warn] [pid 6701] AH01906: xxx:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 27 11:45:35.081620 2015] [mpm_prefork:notice] [pid 6701] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 PHP/5.6.6-2 OpenSSL/1.0.1k configured -- resuming normal operations
[Fri Mar 27 11:45:35.081693 2015] [core:notice] [pid 6701] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 27 11:56:41.650574 2015] [mpm_prefork:notice] [pid 6701] AH00169: caught SIGTERM, shutting down
[Fri Mar 27 11:56:42.911897 2015] [ssl:warn] [pid 7255] AH01906: xxx:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 27 11:56:42.912493 2015] [suexec:notice] [pid 7255] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Fri Mar 27 11:56:42.983533 2015] [auth_digest:notice] [pid 7257] AH01757: generating secret for digest authentication ...
[Fri Mar 27 11:56:43.238951 2015] [ssl:warn] [pid 7257] AH01906: xxx:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 27 11:56:43.273995 2015] [mpm_prefork:notice] [pid 7257] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 PHP/5.6.6-2 OpenSSL/1.0.1k configured -- resuming normal operations
[Fri Mar 27 11:56:43.274080 2015] [core:notice] [pid 7257] AH00094: Command line: '/usr/sbin/apache2'

Has anyone had any ideas or come across a similar problem?

Cheers in advance

解决方案

https://www.devside.net/wamp-server/apache-and-php-limits-and-timeouts

When using PHP-FCGI (a separate PHP process ran via Apache’s mod_fcgid), mod_fcgid caps uploads to 128KB by default in newer versions (v2.3.6 and above), and usually returns a "500 Server Error" when that limit is reached.

这篇关于Debian Jessie - Apache2 / PHP 5.6,无法上传超过128kb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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