Truncated $_POST data from "NULL" string character

Discuss server installationa nd configuration issues here

Moderators: macek, egami, gesf

harry007
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Dec 07, 2010 5:57 am

Truncated $_POST data from "NULL" string character

Postby harry007 » Tue Dec 07, 2010 6:15 am

Hi,

I have less hands on the web-application and currently facing one critical issue.
Issue: “NULL” string terminating character contained in $_POST is not getting parse on 32-bit server.
We have client, implemented in c/c++ code and uses curl library to communicate with server.
We have two servers with following configurations
1) 64 bit-Server: 7.0-STABLE FreeBSD, apache2, php 5.2.5
2) 32 bit-Server: 5.4-RELEASE FreeBSD, apache2, php 5.0.3
Now, when client machine sent a request (post method) to a 64-server containing “null” character is properly getting parse/understand by server but when same request is sending on 32-bit server, string present after “null” character getting truncated on 32-bit server.
I searched a lot on google about the issue but no help yet. My suspect is something to do with apache server settings.
Any pointer on it will be highly appreciated.

Thanks in Advance…. :help:

- Harshal

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Truncated $_POST data from "NULL" string character

Postby egami » Thu Dec 16, 2010 1:38 pm

I don't think it has anything to do with 32 or 64 bit as much as it would with either an apache or php version/configuration error/issue.

harry007
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Dec 07, 2010 5:57 am

Re: Truncated $_POST data from "NULL" string character

Postby harry007 » Thu Dec 16, 2010 11:27 pm

egami wrote:I don't think it has anything to do with 32 or 64 bit as much as it would with either an apache or php version/configuration error/issue.


Thanks for your reply egami.

Yes I also think that it should not to do anything with 32 or 64 bit.

But I am also not getting/sure about which configuration settings are causing this behavior.

I tried to play more with that and following are some more observation
- Tried to read $HTTP_RAW_POST_DATA for which I required to change some client code and observed that this raw data was contained the NULL character but for some reason $_POST data didnt get populated (may be because of client code change which fails PHP to parse raw data into $_POST - dont know)

- As $_POST data was not getting populated, I removed the client code changes and tried to read again RAW data but then RAW data was always remaining empty :(

I am not sure but is there any such configuration setting which can affect the Parsing of RAW data into $_POST becausing of which $_POST doesnot having data/string after the NULL character.

Thanks,
Harshal


Return to “Server installation and configuration”

Who is online

Users browsing this forum: No registered users and 0 guests