|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2002-06-13 18:36 UTC] cfranke at harlingen dot tstc dot edu
 I'm using Apache 2.0.36 with PHP 4.2.1 via the Apache 2 dll on a Windows 2000 Advanced server machine, with both components being binary distributions.
I'm finding that when I try to use the POST method to send data from a form to a php script, no post data shows up whatsoever, and verified it using the following:     
  echo implode('~', $_POST);
Sending form data via the GET method works without a problem.
I've seen this was a problem that came up before, but was supposed to have been fixed.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 16:00:01 2025 UTC | 
Updated PHP to php4-win32-STABLE-200206140000 this morning. This is what I get on the page in question with errors turned on: Notice: Undefined index: concern in C:\httpd\scform.php on line 3 Notice: Undefined index: recommend in C:\httpd\scform.php on line 4 Notice: Undefined index: name in C:\httpd\scform.php on line 5 Notice: Undefined index: dept in C:\httpd\scform.php on line 6 Notice: Undefined index: ext in C:\httpd\scform.php on line 7 Notice: Undefined index: email in C:\httpd\scform.php on line 8 This is the form parser script that I am using: [I've stripped the code down to only the portion that I have active] <html><body> <? $concern = $_POST['concern']; $recommend = $_POST['recommend']; $name = $_POST['name']; $dept = $_POST['dept']; $ext = $_POST['ext']; $email = $_POST['email']; echo "$concern<br><br>"; echo "$recommend<br><br>"; echo "$name<br><br>"; echo "$dept<br><br>"; echo "$ext<br><br>"; echo "$email<br><br>"; echo "Mail Passed<br><br>"; echo implode('~', $_POST); ?> </body></html> And here is the form code itself [stripped down to only the form code]: <form action="scform.php" method='POST'> <p><b>Concern/Issue</b><br> <textarea name="concern" cols="60" rows="5" tabindex="1"></textarea> </p> <p><b>Recommendation/Idea: </b><br> <textarea name="recommend" cols="60" rows="5" tabindex="2"></textarea> </p> <table width="300" border="0"> <tr> <td colspan="2"><b>Submitted by:</b></td> </tr> <tr> <td>Name:</td> <td> <input type="text" name="name" size="30" tabindex="3"> </td> </tr> <tr> <td>Department: </td> <td> <input type="text" name="dept" size="30" tabindex="4"> </td> </tr> <tr> <td>Extension:</td> <td> <input type="text" name="ext" size="10" tabindex="5"> </td> </tr> <tr> <td>E-mail: </td> <td> <input type="text" name="email" size="50" tabindex="6"> </td> </tr> </table> <p> <input type="submit" name="Submit" value="Submit Form"> <input type="reset" name="Clear" value="Clear Form"> </p> <p> </p> </form>I found the exact cause of the error. This looks like it could either be a PHP bug or an Apache 2 bug: Originally in my Apache 2 conf file I had the following to load php: LoadModule php4_module C:/php/sapi/php4apache2.dll <FilesMatch "\.php$"> SetOutputFilter PHP </FilesMatch> When I switched it to the following, POST method started working again: LoadModule php4_module C:/php/sapi/php4apache2.dll AddType application/x-httpd-php .php