由POST没有页面超时无法发送的字符串长度超过1333个字符 [英] Cannot send a string longer than 1333 characters by POST without the page timing out

查看:177
本文介绍了由POST没有页面超时无法发送的字符串长度超过1333个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发送包含多于1333字符输入隐藏字段的一个问题。如果字符串包含超过1333个字符,然后当我尝试通过POST,页面超时发送的形式。有没有设置任何地方,我必须要改变?

I have a problem sending an input hidden field containing more that 1333 characters. If the string contains more than 1333 characters, then when I try to send the form via POST, the page times out. Is there a setting anywhere that I have to change ?

我使用Symfony2的,我不知道是否有什么关系呢?奇怪的是,我的Web服务器上工作,但不是我的本地计算机上。

I'm using Symfony2, I don't know if there is something related to that ? Strangely, it does work on my web server, but not on my local computer.

下面的形式:

<form  action="{{ path('osc_dashboard_playerEvaluation_evaluationSession_evaluate', {"evaluationSessionId" : evaluationSession.id}) }}" {{ form_enctype(form) }} method="POST" class="">
        <table class="table table-hover table-bordered">
            <thead>
            <!-- This will be generated with Twig so it is normal that is does not correspond to the data below -->
            <tr>
                <th style="width:50px;">Nom</th>
                {% for test in tests %}
                    <th colspan="{{ test[1] }}" style="text-align:center;">{{ test[0] }}</th>
                {% endfor %}

            </tr>
            <tr>
                <th></th>
                {% for test in tests %}
                    {% for testNumber in 1..test[1] %}
                        <th style="width:30px;text-align: center;">{{ testNumber }}</th>
                    {% endfor %}
                {% endfor %}

            </tr>
            </thead>
            <tbody data-bind="foreach: playersEvaluation()">
            <tr data-bind="">
                <td data-bind="text: $data.playerName"></td>
                <!-- ko foreach: evaluatedExercises -->
                <!-- ko foreach:tries -->
                <td style="width:30px;text-align:center;">
                    <input type="text" data-bind="value: result" style="text-align:center;width:30px;" />
                </td>
                <!-- /ko -->
                <!-- /ko -->
            </tr>
            </tbody>
        </table>



        <input type="hidden" id="results" name="results" data-bind="value: exportToJSON() " />

        <input type="hidden" name="resultsJSON" id="resultsJSON" value="{{ resultsJSON }}" />
        <br />
        {{ form_widget(form) }}
        <button class="btn btn-success">Sauvegarder</button>
        <a class="btn" href="{{ path('osc_dashboard_playerEvaluation_evaluationSession') }}">Annuler les modifications</a>
    </form>

另外,两个服务器具有相同的文件,因为它们都需要从混帐回购他们的数据。

Also, both servers have the same files since they all take their data from a git repo.

这里是我的本地配置:

Symfony2 version: 2.2.3
MAC OSX 10.8.4
MAMP Pro
PHP version: 5.4.4

这里是我的服务器配置:

Symfony2 version: 2.2.3
Ubuntu 12.04
PHP version: PHP 5.4.15-1~precise+1

这里就是我试图做的就是为什么数据不是我的本地计算机上发送​​一个线索。


  • 我删除的Symfony2 dev.log,点击该按钮发送的形式,得到了超时错误,不幸的是,日志仍然是空的......

  • I deleted Symfony2 dev.log, clicked on the button to send the form, got the time out error and unfortunately, the log is still empty....

此外,所有PHP和Apache日志不显示任何东西...

Also, all the php and apache logs do not show anything...

我给自己定的post_max_size = 500M

I've set post_max_size = 500M

我已经设置LimitBodyRequest 0

I've set LimitBodyRequest 0

您可以在这里看到我的phpinfo页: http://jsfiddle.net/etiennenoel/VZfeQ/

You can see my phpinfo page here: http://jsfiddle.net/etiennenoel/VZfeQ/

我对为什么这个数据不会得到真正发送不知道...

I have really no clue on why this particular data won't get send...

我发现,这是从这个问题未来很长的路要走问题:<一href=\"http://stackoverflow.com/questions/17601461/sending-a-form-containing-a-serialized-json-object-causes-a-timeout\">Sending包含序列化的JSON对象的形式导致超时

I found that this was the problem coming a long way from this question: Sending a form containing a serialized JSON object causes a timeout

更新2

我改变的执行时间和4分钟后,我得到了一个Symfony的错误: http://jsfiddle.net / etiennenoel / Em4Fp /

I changed the execution time and after 4 minutes, I got a Symfony error: http://jsfiddle.net/etiennenoel/Em4Fp/

推荐答案

这有可能与做两种:

post_max_size要值在PHP配置(以字节为单位与可选K,M和G后缀)

the value of post_max_size in the php configuration (measured in bytes with an optional K, M, and G Suffixes)

阿帕奇的 LimitRequestBody 指令(以字节为单位)

the LimitRequestBody directive of apache (measured in bytes).

这篇关于由POST没有页面超时无法发送的字符串长度超过1333个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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