POST variable is empty
| From: | Gustavo | Date: | Tue, 18 Mar 2008 18:14:27 +0000 |
| Subject: | POST variable is empty | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-18739@lists.php.net to get a copy of this message | ||
Hi All,
After an apache compilation the $_POST variables is empty.
I try to send some value value using POST method but the $_POST is always
empty in target script.
GET methods is working fine
Looking at error log, there isn't any usefull error information there.
Anyone have experienced some problem like that ?
Below i leave some information about test code used and Apache and PHP
configurations.
Thanks in advanced.
Gustavo.
-------------------------
Example :
<?php
####PHP Code to see $_POST values
echo '-------------------------'."<br>";
echo "POST -> ".count($_POST)."<br>";
echo '-------------------------'."<br>";
print_r($_POST);
echo "<br>";
echo '-------------------------'."<br>";
echo "HTTP_POST_FILES -> ".count($_HTTP_POST_FILES)."<br>";
echo '-------------------------'."<br>";
print_r($_HTTP_POST_FILES);
echo "<br>";
#### below is the form html code
?>
<form name="login" method="post" action="phpinfo.php">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><div align="left"><font face="Arial" size="2">Digite aqui oteste</font></div></td>
<td><div align="left"><font face="Arial"><input name="username"type="text" size="30" value="SEND_BY_POST" /></font></div></td> </tr> <tr>
<td colspan="2" align="center"><font face="Arial"><input type="submit"name="submit" value="Do It!" /></font></td> </tr> </table> </form> The result is : ------------------------- POST -> 0 ------------------------- Array ( ) ------------------------- HTTP_POST_FILES -> 0 ------------------------- I´m using : CentOS server Apache 1.3 PHP4 -> 4.4.8 PHP5 -> 5.2.5 PHP4 and PHP5 is running as CGI using suExec PHP4 modules : '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-force-cgi-redirect' '--enable-ftp' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-safe-mode' '--enable-sockets' '--enable-xslt' '--prefix=/usr/php4' '--with-curl=/opt/curlssl/' '--with-expat-dir=/usr' '--with-gd' '--with-gettext' '--with-iconv' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-png-dir=/usr' '--with-xmlrpc' '--with-xpm-dir=/usr/X11R6' '--with-xslt-sablot=/opt/sablot/' '--with-zlib' '--with-zlib-dir=/usr'