postNetText() won't submit form data to php
postNetText php perl bug

  postNetText() won't submit form data to php


It seems that postNetText is losing its form data when posted to a php script. The script is executed, but the incoming array is empty.


The director online help says:

postNetText(url, propertyList {,serverOSString} {,serverCharSetString})
postNetText(url, postText {,serverOSString} {,serverCharSetString})

With php, syntax 1 transfers the POST data to php (where they can be referenced as $HTTP_POST_VARS or get listed using phpinfo() ) and syntax 2 completely fails to do so.
A perl cgi, on the other hand, recieves POST data regardless which syntax you choose.

Test Results:

Some tests here apparently indicate that director (authoring, exe, shockwave) fails to submit form data to PHP scripts via POST while the very same operation succeeds if the form data handler is a PERL script.
Submitting the form data via GET works fine, too.

The test results did not vary if I tried it in DfW 7.02 or DfW 8.51, both under w2kSp3. The results remained the same with PERL and PHP running under Apache 1.3.26 on my w2k box or Apache on my ISPs Linux 7.2
Testers confirmed that postNetText w/PHP also fails on MSIE 5.1 and NS 6.2. /MacOS 9.2.2, or from SW & in authoring /W2K, IE 6.0.

I'm at a loss on why this happens or why it happens here while another poster saw no problems.
An unexpected result, looks like a bug to me.

Olivier BATAILLE remarked: With syntax 2 the Content-type of the http request (POST) is fixed to 'text/plain' but with syntax 1 it is fixed to 'application/x-www-form-urlencoded' (necessary for CGI queries).

Test Form:


(steps to repro from the messWin):
There are 2 bare bones form data handler that just echo the data:

dUrl = ""
dUrl = ""

some parameters and sending it from the message window via GET or POST:

dParam = "arg1=This&arg2=is&arg3=a&arg4=test"

dId = getNetText( dUrl & "?" & dParam )
dId = postNetText(durl, "&" & dParam)

So there are four possible combos. Test it yourself.


a .zip - Archive including .dir, .php, .pl (13 KB)
a .zip - Archive including .dir, .php, .pl, .dcr and .exe/xtras (1,5 MB)

Home shock + cgi Bits 'n pieces Director Lingo Shocklets Contact