Forum Moderators: coopster & phranque

Message Too Old, No Replies

PERL on WINDOWS form will not POST

form "timesout"

         

tonyphipps

2:02 pm on Oct 11, 2004 (gmt 0)

10+ Year Member



We have a perl script running on a dedicated Windows server - the script itself runs, EXCEPT when it is called from a <form method="POST" action="script.cgi"></form> on a page. Then it times out after 90 seconds with a page saying "Cannot find server or DNS Error"

If THE SAME COMMAND is run in the address bar (i.e. [myserver.com...] - it works OK - so it's something to do with the POST method I guess?

Worse still - we have another cgi script running in the same directory - and that works just fine using forms with the POST method!

Any ideas?

kaled

5:26 pm on Oct 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since you have access to the server, you should be able to test the script directly.

Create a .BAT file that sets up the environment vars.

Use a pipe to simulate input (by the post method).

It should look something like this.


@path %path%;D:\perl\bin\;

set SERVER_NAME=www.domain.com

set HTTP_REFERER=http://www.domain.com/test.html

set QUERY_STRING=name1=value1^&name2=value2

perl <TestData.txt -w perlscript.pl

@echo.
pause

I develop my scripts like this before uploading.

Kaled.

tonyphipps

5:38 pm on Oct 11, 2004 (gmt 0)

10+ Year Member



After loads of testing, stripping out ALL unwanted code etc - it transpired that the Windows server didn't like the fact that we were using "use CGI;" in addition to parsing form input with STDIN - the previous UNIX server didn't get bothered by this - so we forgot about the unwanted parse command?!