2013-07-12 40 views
0

發送包含多個1333個字符的輸入隱藏字段時出現問題。如果字符串包含超過1333個字符,則當我嘗試通過POST發送表單時,頁面超時。有什麼地方需要改變嗎?無法通過POST發送長度超過1333個字符的字符串,但頁面超時

我正在使用Symfony2,我不知道是否有與此相關的東西?奇怪的是,它可以在我的Web服務器上工作,但不能在我的本地計算機上工作。

這裏的形式:

<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> 

此外,這兩個服務器具有相同的文件,因爲它們都需要從混帳回購他們的數據。

這裏是我的本地配置:

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,點擊了按鈕發送的形式,得到了超時錯誤,不幸的是,日誌仍然是空的....

  • 此外,所有的PHP和Apache日誌不顯示任何東西......

  • 我給自己定的post_max_size = 500M

  • 我設置LimitBodyRequest 0

你可以看到我的phpinfo頁面在這裏:http://jsfiddle.net/etiennenoel/VZfeQ/

我對爲什麼這個數據不會得到真正發送不知道......

我發現,這是未來的一個長期問題從這個問題的辦法:https://stackoverflow.com/questions/17601461/sending-a-form-containing-a-serialized-json-object-causes-a-timeout

更新2

我改變的執行時間和4分鐘後,我得到了一個Symfony的錯誤:http://jsfiddle.net/etiennenoel/Em4Fp/

回答

0

這具有可能與採取任一:

post_max_size在php配置的值(以字節爲單位與任選的K,M,和G後綴)

的apache指令(以字節爲單位)。

+0

這不是post_max_size,500M,我敢肯定兩個字符的輸入文本字段和1333個字符中的一個會突發500M。另外,在1333年,頁面加載非常快,沒有任何延遲。我會尋找LimitRequestBody,它在httpd.conf中嗎? – CoachNono

+0

有虛擬主機配置或.htaccess – Orangepill

+0

LimitRequestBody爲0不起作用... – CoachNono

相關問題