ID:               32375
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jnavratil at houston dot rr dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: SuSE Linux 9.1
 PHP Version:      5CVS-2005-03-19 (dev)
 New Comment:

I can not reproduce this. Please give more information about your
setup: How did you configure PHP in httpd.conf? What changes did you
make into php.ini? (is the right php.ini loaded?) 

And DO NOT paste full php.ini here! Make a unified diff against
php.ini-dist (or if you used php.ini-recommeded as basis, against that
one)



Previous Comments:
------------------------------------------------------------------------

[2005-03-19 19:50:24] jnavratil at houston dot rr dot com

Description:
------------
This bug is similar to, but not quite the same as bug #31417.

Running Suse Linux 9.1, Apache 2.0.53 and latest snapshot of PHP, I do
not have $_POST variables being set.  $_GET superglobal seems to be
fine.  Additionally, even though phpinfo() shows
'always_populate_raw_post_data' on, $HTTP_RAW_POST_DATA is not
defined.

PHP configure line is:

./configure --prefix=/usr/local/php5 \
       --with-apxs2=/usr/local/apache2/bin/apxs \
       --with-libxml-dir=/usr/local/lib --with-zlib \
       --with-zlib-dir=/usr/local/lib \
       --with-mysql=/usr \
       --with-gd \
         --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib \
         --enable-gd-native-ttf --with-freetype-dir=/usr/lib \
       --enable-soap --enable-sockets \
       --with-jpeg-dir=/usr --enable-exif


Reproduce code:
---------------
<html>
  <body>
<?php
echo '<!-- $_POST:'.print_r($_POST, TRUE)." -->\n";
echo '<!-- $_GET:'.print_r($_GET, TRUE)." -->\n";
echo '<!-- $_REQUEST:'.print_r($_REQUEST, TRUE)." -->\n";
// Next line generates 'Undefined variable: HTTP_RAW_POST_DATA'
// even though phpinfo shows always_populate_raw_post_data On
// echo '<!-- raw post data:'.$HTTP_RAW_POST_DATA." -->\n";
if (!isset($_POST['tableName']) or trim($_POST['tableName']) == '') {
?>
    <form method="post" action="post.php">
      <p> Table Name:&nbsp;<input type="text" name="tableName" /> </p>
      <input type="submit" value="Submit" />
    </form>
<?php } else { ?>
    <p> You entered <?php echo $_POST['tableName']; ?> </p>
<?php } ?>
  </body>
</html>

Expected result:
----------------
I expect the code to present a form to input a string, then display the
string when the form is submitted.  I expect to see comments in the page
source displaying the $_POST, $_GET and $_REQUEST arrays.

Actual result:
--------------
The $_POST variables are not set when the form is submitted.  If I
attach variables to the URL (i.e. post.php?key=value), I see variables
in the $_GET and $_REQUEST superglobals.  Comments generated in the
page source indicate that $_POST is an array, but it is empty.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32375&edit=1

Reply via email to