#27654 [NEW]: POST variables not set running under suexec
| From: | michaelkeeley at hotmail dot com | Date: | Fri, 19 Mar 2004 11:23:53 +0000 |
| Subject: | #27654 [NEW]: POST variables not set running under suexec | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-56668@lists.php.net to get a copy of this message | ||
From: michaelkeeley at hotmail dot com
Operating system: Linux
PHP version: 4.3.4
PHP Bug Type: CGI related
Bug description: POST variables not set running under suexec
Description:
------------
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???!
Mike
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/5.0.2.2634 mod_ssl/2.8.16
OpenSSL/0.9.6b
Reproduce code:
---------------
#!/usr/bin/php
<html>
<body>
<?
print "You typed: ".$_POST['myinput']."<br>";
?>
Type Something:
<form action="go.cgi" name=cmd method='POST'>
<input type=text name="myinput" size=50>
</form>
</body>
</html>
Expected result:
----------------
You typed: whatever I type
Type Something
[ ]
Actual result:
--------------
You typed:
Type Something
[ ]
--
Edit bug report at http://bugs.php.net/?id=27654&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27654&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27654&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27654&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27654&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27654&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27654&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27654&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27654&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27654&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27654&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27654&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27654&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27654&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27654&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27654&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27654&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27654&r=float