#27654 [Opn->Fbk]: POST variables not set running under suexec
| From: | iliaa@php.net | Date: | Tue, 23 Mar 2004 23:18:46 +0000 |
| Subject: | #27654 [Opn->Fbk]: POST variables not set running under suexec | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56725@lists.php.net to get a copy of this message | ||
ID: 27654
Updated by: iliaa@php.net
Reported By: michaelkeeley at hotmail dot com
-Status: Open
+Status: Feedback
Bug Type: CGI related
Operating System: Linux
PHP Version: 4.3.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Also check your variables_order variable.
Previous Comments:
------------------------------------------------------------------------
[2004-03-19 06:23:44] michaelkeeley at hotmail dot com
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 this bug report at http://bugs.php.net/?id=27654&edit=1