Capturing xforms standard input via PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Denis

    #1

    Capturing xforms standard input via PHP?

    I'm working with a JavaScript implementation of Xforms (FormFaces) and
    am trying to capture the standard input of a submit via a POST method
    (XML data). I've found I can capture the standard input with a shell
    script but not with a PHP script. I've tried to capture the standard
    input with both the system command ( cat >file ) and using fopen/fwrite
    but neither technique works (I can run my PHP script from command line
    fine).

    My server is Linux running Apache 1.3.34 with PHP 4.4.2. My question
    is whether I should be able to do this with PHP or whether this is an
    Apache configuration issue for my server. Anyone know?

    If this is not possible, my work around is to use a shell script to
    capture stdin to a file and then invoke a PHP program to do the rest of
    the processing but I'd rather avoid the kludge if possible.

    Denis

  • Tim Van Wassenhove

    #2
    Re: Capturing xforms standard input via PHP?

    On 2006-06-05, Denis <sysdrk@wowway. com> wrote:[color=blue]
    > I'm working with a JavaScript implementation of Xforms (FormFaces) and
    > am trying to capture the standard input of a submit via a POST method
    > (XML data). I've found I can capture the standard input with a shell
    > script but not with a PHP script. I've tried to capture the standard
    > input with both the system command ( cat >file ) and using fopen/fwrite
    > but neither technique works (I can run my PHP script from command line
    > fine).[/color]

    The last time i tried to gather (unmodified) XML data that was posted i
    did it with $input = file_get_conten ts('php://input');

    --
    Met vriendelijke groeten,
    Tim Van Wassenhove <http://timvw.madoka.be >

    Comment

    • Denis

      #3
      Re: Capturing xforms standard input via PHP?


      Tim Van Wassenhove wrote:[color=blue]
      >
      > The last time i tried to gather (unmodified) XML data that was posted i
      > did it with $input = file_get_conten ts('php://input');[/color]

      Great - this works. The "secret" is using php://input rather than
      php://stdin. Thanks!

      Denis

      Comment

      Working...