php upload_max_filesize - 完美的 ubuntu 服务器 ISPConfig 3

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7217669/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 02:16:45  来源:igfitidea点击:

upload_max_filesize - The perfect ubuntu server ISPConfig 3

php

提问by jon

I have looked at all the posts regarding upload_max_filesize but am still not making any progress! any help would be appreciated.

我已经查看了所有关于 upload_max_filesize 的帖子,但仍然没有取得任何进展!任何帮助,将不胜感激。

I have set

我已经设定

vi /etc/php5/apache2/php.ini
upload_max_filesize = 10M
post_max_size = 20M 

also

vi /etc/php5/cli/php.ini
upload_max_filesize = 10M
post_max_size = 20M

ini_get('upload_max_filesize') reports 2M

ini_get('upload_max_filesize') 报告 2M

mem limit is 128M Where else do I need to go looking [apache config?].

内存限制是 128M 我还需要去哪里寻找 [apache 配置?]。

In addition I cannot for the life get this to work either!

另外我终生也不能得到这个工作!

error_reporting = E_ALL & ~E_DEPRECATED
display_errors = On

error_reporting is getting logged OK so at least I have some feedback. chrome gives internal server error firefox gives blank page.

error_reporting 记录正常,所以至少我有一些反馈。chrome 给出内部服务器错误 firefox 给出空白页面。

I am using ubuntu server 10.10 ISPConfig 3 for learning about linux OS and php programming.

我正在使用 ubuntu 服务器 10.10 ISPConfig 3 来学习 linux 操作系统和 php 编程。

thanks

谢谢

回答by John

this method works and is great if your setting for one website or for defaulting a servers cgi, if u have multiple sites, that need different settings for each site, your way will be will be the default for all sites added to the panel.

如果您为一个网站设置或默认服务器 cgi,则此方法有效并且非常有用,如果您有多个站点,每个站点需要不同的设置,则您的方式将是添加到面板的所有站点的默认设置。

If you have multiple sites

如果您有多个站点

what u can do is set your default like above.

你可以做的是像上面一样设置你的默认值。

and for each individual site, you can add the custom values in the sites tab on ispconfig 3..

对于每个单独的站点,您可以在 ispconfig 3 的站点选项卡中添加自定义值。

click your website in the sites tab in ispconfig, and then select the options tab for that website.

在 ispconfig 的站点选项卡中单击您的网站,然后选择该网站的选项选项卡。

there should be two input boxes for setting custom php settings and apache2 for that site individually on ispconfig 3.

应该有两个输入框用于在 ispconfig 3 上分别为该站点设置自定义 php 设置和 apache2。

in The php custom add your custom settings

在 php custom 中添加您的自定义设置

display_errors = On
post_max_size = 48M
upload_max_filesize = 24M

below is where u can manually edit php.ini's.

下面是您可以手动编辑 php.ini 的地方。

site wide cgi would be:

站点范围的 cgi 将是:

/etc/php5/cgi

sites on the configs individual php.ini, should b located in:

配置个人 php.ini 上的站点,应该位于:

/var/www/conf/web1/php.ini 

web1 above is for site #1 on the panel. for other sites it would b web 2, for site 2 and so on and so forth.

上面的 web1 用于面板上的站点 #1。对于其他站点,它将 b web 2,站点 2 等等。

if want to make your own custom php.ini's you can place your own custom in:

如果想制作自己的自定义 php.ini,您可以将自己的自定义放在:

/etc/php5/cgi/conf.d 

also be sure to make a info.php using any text editor,

还要确保使用任何文本编辑器制作 info.php,

<? phpinfo(); ?>

save as info.php

另存为 info.php

and upload it to your site to find exact locations of your php.ini if unsure where they are..

如果不确定它们在哪里,请将其上传到您的站点以查找您的 php.ini 的确切位置。

http://yourdomain.com/info.php

http://yourdomain.com/info.php

回答by jon

update: upload_max_filesize I managed to resolve my problem on my own. Setting the vars in the following file.

更新:upload_max_filesize 我设法自己解决了我的问题。在以下文件中设置变量。

/etc/php5/cgi vi php.ini

error_reporting = E_ALL & ~E_DEPRECATED
display_errors = On
post_max_size = 48M
upload_max_filesize = 24M

回答by user3526895

My method is detailed here: http://www.breckers.co.uk/increase-php-maximum-upload-size-with-ispconfig/

我的方法在这里详细说明:http: //www.breckers.co.uk/increase-php-maximum-upload-size-with-ispconfig/

Basically, in ISPConfig, set the following for the Custom php.ini settings under the sites>###site###>Options Tab

基本上,在 ISPConfig 中,在站点>###site###>选项选项卡下为自定义 php.ini 设置设置以下内容

upload_max_filesize = 25M
post_max_size = 25M

Save, wait for the Jobqueue to finish (viewable under monitor)

保存,等待 Jobqueue 完成(可在监视器下查看)

And finally, restart the web service, or the server to make sure.

最后,重新启动 Web 服务或服务器以确保。

回答by John

Your method def works great and helped me alot figuring things out. Manually always works best..

你的方法 def 效果很好,帮助我解决了很多问题。手动总是最好的..

I just figured, ill add to your method, in-case any new members trying ispconfig, experienced the same problem like i did, and needed some more information on where setting things manually, or thru the panel can save them some time.

我只是想,我会添加到您的方法中,以防任何尝试 ispconfig 的新成员遇到与我一样的问题,并且需要更多有关手动设置内容的信息,或者通过面板可以节省一些时间。

Glad it working out..

很高兴它的工作..