php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39647 Not populating $_POST data
Submitted: 2006-11-27 16:59 UTC Modified: 2006-11-27 18:13 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: security at isnnetworks dot net Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.2.0 OS: Linux, Centos 4.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: security at isnnetworks dot net
New email:
PHP Version: OS:

 

 [2006-11-27 16:59 UTC] security at isnnetworks dot net
Description:
------------
Using php 5.2.0 and php 4.4.4 as a cgi module results in no $_POST data being given.

The headers are being sent just php is returning nothing.

There is nothing in the error logs,  nothing when setting E_ALL for error_reporting.  The DSO version works fine, this is a second installation compiled with.

./configure --prefix=/usr/local/php5 --exec-prefix=/usr/local/php5 --program-suffix=5 --enable-force-cgi-redirect

Using --enable-debug doesn't return anything either.

Loaded into apache using,

Action application/x-httpd-php5 "/php/php5"
AddType application/x-httpd-php5 .php5

Where /php is a script-alias , does not work using --disgard-path either.

I am not sure where to even start to see where the problem is, I have tried everything.  Recompiling with no options other than the prefix etc, with debugging, changing the form enctype and still nothing.

Reproduce code:
---------------
<html>
<head>
</head>
<body>
 
 
<form action="test.php" method="post" enctype="multipart/form-data">
<input type="input" name="test" value=""><br />
<input name="submit" type="submit"></form>
<pre>
<?php
ini_set('error_reporting', E_ALL);
 
print_r(get_defined_vars());
 
print_r($_POST);
 
print_r($_REQUEST);
 
print_r($_GET);
 
?>
</pre>
 
 
</body>
</html> 

Expected result:
----------------
To see the data posted

Actual result:
--------------
No data in $POST

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-27 17:24 UTC] tony2001@php.net
Please make sure that PHP actually receives the data and post all parts of your httpd.conf related to CGI configuration.
Also please upload your phpinfo() somewhere and post the link here.
 [2006-11-27 17:30 UTC] security at isnnetworks dot net
The phpinfo can be seen here,

http://tinyurl.com/yhkr6y

The script(points to ,php5 extension here)

http://tinyurl.com/yh67oh

Necessary httpd.conf lines,

Action application/x-httpd-php5 "/cgi-sys/php5"
AddType application/x-httpd-php5 .php5
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/

# /usr/local/cpanel/cgi-sys/php5 -v
PHP 5.2.1-dev (cgi) (built: Nov 27 2006 05:40:40) (DEBUG)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
 [2006-11-27 17:42 UTC] tony2001@php.net
It would also help if you remove/disable all these modules first:
mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
 [2006-11-27 17:44 UTC] security at isnnetworks dot net
This is a production server so if possible i'd rather not.  I am reproducing it on 6 other servers all the same setup.

I can disable those if you require however would prefer if it was possible not to.  

There doesn't seem to be any errors , anything that I could check?  gdb on the actual php5 binary wouldn't do much good.
 [2006-11-27 17:50 UTC] tony2001@php.net
It's easy to run Apache using different httpd.conf with all those modules disabled and listening to another port.
Just use `httpd -f </path/to/new/httpd.conf>`.
 [2006-11-27 18:06 UTC] security at isnnetworks dot net
Thank you for your help.  Once I removed the modules it worked.

I have renabled them all except mod_bandwidth.so and it's working fine so it's a problem with that module.

Once again, thank you very much as I would have not even considered that.  Sorry to have bothered you, thanks again.
 [2006-11-27 18:13 UTC] tony2001@php.net
No problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC