textarea bazen $ _POST eksik ama her zaman doğru CONTENT_LENGTH?

1 Cevap php

Garip bir hata oldukça aktif bir site çalıştıran bir sunucuya açıldı.

  • Sunucu: Apache/2.2.3 (CentOS)
  • PHP: 5.2.6
  • eAccelerator 0.9.5.3

Çok parçalı formlar kullanırken, bazen bir textarea gönderilen veriler $ _POST eksik olacak

Biz CONTENT_LENGTH 1K üzerinde makul bir boyutunu gösterir çünkü veri gönderildi biliyorum

Şeklinde Diğer tüm giriş alanları düzgün alınır.

Bu tarayıcı özgü değildir ve IE / Firefox / Krom olur.

Zamanın neredeyse% 99 çalışır, ancak yapılan her yüz mesajlar için ortalama 1 veya 2 kez başarısız olur.

Çok nadir vesilesiyle bu yüzden biz sadece apache / php tarafından işlendiği değil, veri gönderilen biliyoruz kendimizi çoğaltmak mümkün oldum

All of these settings have been checked and are reasonable in php.ini:

memory_limit
max_input_time
upload_max_file_size
post_max_filesize

httpd.conf

LimitRequestBody
TimeOut

Would love to hear other ideas what this might be. I cannot find any known related bug for PHP.

1 Cevap

Not sure this is the problem (not an easy to guess question ^^ ), but if you have the suhoshin security patch/extension, did you try de-activating it ?
(I don't know if it's activated by default on CentOS, but it might be, considering it is on Ubuntu, which is "less entreprise oriented")

Örneğin ben, demek notların bir çift vardır ki, çünkü this bug report Bu telkin ediyorum:

[30 Oct 2007 11:02am UTC] sbauer at gjl-network dot net

While experiencing this issue, too we found that the cause of this problem was the suhosin patch, wich was - by default - configured to have a max limit for the length of cookie, request, post, get and session vars. E.g. for POST this looks like:

suhosin.post.max_array_depth 100 100 suhosin.post.max_array_index_length 64 64 suhosin.post.max_name_length 64 64 suhosin.post.max_totalname_length
256 256 suhosin.post.max_value_length 65000 65000 suhosin.post.max_vars
200 200

Those derivatives needs to be set to a adequate higher number. E.g. in our case, the problem was, that our POST data was too long (as this seems to be the case for a lot of you here).

So I suggest to check your php.ini or (according to your distribution there often is a suhosin.ini) and correct the above values or set them to 0 to disable it. If those derivatives are not set, default values will be used. You need to check / add: suhosin.post.max_.... suhosin.request.max_... suhosin.get.max_... suhosin.session.max_... suhosin.cookie.max_...

Refer to your phpinfo() where these values should be listed!

Ve / veya:

[13 Nov 2008 4:58pm UTC] keith at tdrnetworks dot com

Regarding the enctype="multipart/form-data" not populating the $_POST vars I found my solution was to disable the Suhosin security module.

Gitmek var!

Diyor bir de not vardır:

[5 Feb 6:49pm UTC] neal dot pressley at yahoo dot com

I was facing the same problem. I had a html form with php scripts in which I was submitting radio buttons or checkboxes. When I post the form, PHP was not finding any post parameters. it was random, some time it was working and some time not. Even I tried with Get, it worked some time and some time not. Then I change ENCTYPE from uppercase to lowercase and it started working prefectly

Form / sayfa HTML-geçerli mi? Belki, bazı nadir durumlarda, bu değil mi?


Maybe this'll help... If not, I'm curious to know the reason of this problem !