php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33276 CGI scripts no longer accepting POST data
Submitted: 2005-06-08 16:29 UTC Modified: 2005-06-08 17:22 UTC
From: ymalik at cs dot stevens dot edu Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.0.4 OS: NetBSD 2.0.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ymalik at cs dot stevens dot edu
New email:
PHP Version: OS:

 

 [2005-06-08 16:29 UTC] ymalik at cs dot stevens dot edu
Description:
------------
The following are two HTML forms along with their corresponding handlers:

(1) a. http://www.cs.stevens-tech.edu/~ymalik/tmp/index.html
    b. http://www.cs.stevens-tech.edu/~ymalik/tmp/action.php



(2) a.  http://www.cs.stevens-tech.edu/~ymalik/tmp/index2.html
    b. http://www.cs.stevens-tech.edu/~ymalik/tmp/action.cgi


2.a is exactly the same as 1.a except the handler is action.cgi.  Accordingly, 2.b is exactly the same as 1.b (with the shbang of course).  When you submit using 1.a, the form data is displayed in the handler script.  However, when you submit using 2.a, the data isn't displayed.  This used to work fine before with PHP 4(I think about 1.5 years ago; I haven't used PHP with form data in a long time).  Using CGI is not necessary is this case, but it is when interacting with the database; this has been done for "security reasons."  Our sysadmin can't figure this one out, though.
Here is the output for phpinfo():
http://www.cs.stevens.edu/~ymalik/phpinfo.php

I have queried the bug system, but I have only found this problem with PHP 4.
Thanks.

Reproduce code:
---------------
Here is the code for action.php:
<?php
print "Number of elements in POST: ". count($_POST) ."\n";
print_r($_POST);
?>

and the code for action.cgi:
#!/usr/pkg/bin/php

<?php
print "Number of elements in POST: ". count($_POST) ."\n";
print_r($_POST);
?>


Expected result:
----------------
I expect to see the same output in action.cgi as I did in action.php

Actual result:
--------------
$_POST has no data in action.cgi.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-08 17:22 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 19:01:32 2024 UTC