|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27654 POST variables not set running under suexec
Submitted: 2004-03-19 06:23 UTC Modified: 2004-03-29 13:30 UTC
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (33.3%)
From: michaelkeeley at hotmail dot com Assigned:
Status: No Feedback Package: CGI/CLI related
PHP Version: 4.3.4 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-03-19 06:23 UTC] michaelkeeley at hotmail dot com
When running my script under *suexec'd* php, the POST variables are not populated. GET is populated OK. When running via apache module, POST vars are OK.

My cgi script is go.cgi, with #!/usr/bin/php at the top, POSTs a form back to itself. Nothing fancy.

php is 4.3.4, apache is 1.3.29

If I write a C program, that outputs stdin, and set the #! line of go.cgi to this program, then the correct POST data is output (myinput=what_i_typed) running under suexec.

If I go back to using #!/usr/bin/php, and read stdin then I get nothing.
Examining the environment ($_ENV) the CONTENT_LENGTH env var is set correctly, the more I type the bigger it gets. Also REQUEST_METHOD=POST. Just no _POST vars.

Changing the form to use GET works fine (via _GET)

All this is on a VirtualHost'd server.

Any ideas???!


PHP Config:

'./configure' '--prefix=/usr' '--with-kerberos' '--with-pspell' '--with-imap' '--with-imap-ssl' '--with-gettext' '--with-xml' '--with-dom' '--with-dom-xslt' '--with-dom-exslt=/usr/lib/exslt' '--with-fdftk' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-ttf' '--with-freetype-dir' '--with-gd' '--enable-gd-native-ttf' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql' '--with-pdflib' '--with-pear' '--enable-xslt' '--with-xslt-sablot=/usr' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' '--with-openssl' '--with-bz2' '--enable-dba' '--with-flatfile' '--with-db3' '--enable-dbase' '--enable-exif' '--enable-wddx' '--enable-trans-sid' '--with-mm' '--enable-dio' '--enable-sysvsem' '--with-zip' '--with-mhash' 

PHP API  20020918  
PHP Extension  20020429  
Zend Extension  20021010  

Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.4 FrontPage/ mod_ssl/2.8.16 OpenSSL/0.9.6b 

Reproduce code:
   print "You typed: ".$_POST['myinput']."<br>";

Type Something:
<form action="go.cgi" name=cmd method='POST'>
<input type=text name="myinput" size=50>

Expected result:
You typed: whatever I type

Type Something
[  ]

Actual result:
You typed:

Type Something
[  ]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-23 18:18 UTC]
Please try using this CVS snapshot:
For Windows:

Also check your variables_order variable. 
 [2004-03-29 13:30 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2005-02-09 18:18 UTC] spammail at ua dot fm
Problem Still here :(

FreeBSD 4.11
apache-1.3.33_1 + suexec 

php-cgi -v
PHP 4.3.10 (cgi) (built: Feb  9 2005 16:56:04)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
complie with 

'./configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-regex=php' '--disable-cli' '--disable-ipv6' '--enable-force-cgi-redirect' '--enable-discard-path' '--prefix=/usr/local' 'i386-portbld-freebsd4.11'
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 11:01:31 2024 UTC