Forum Moderators: coopster & phranque

Message Too Old, No Replies

Perl script not working with IE

         

dektek11

8:25 am on Jan 28, 2005 (gmt 0)

10+ Year Member



I finally got this short-url script working, but have noticed that it errors 404 Page Not Found when run in IE. It works fine in Mozilla/FF, but not IE. Any ideas why that may be?

kalos

6:16 pm on Jan 29, 2005 (gmt 0)

10+ Year Member



Any details on the script itself?

Moby_Dim

7:43 pm on Feb 26, 2005 (gmt 0)

10+ Year Member



This is impossible. Perl does not work on your (client) side like javascript, for ex., but it works on a server, and the server does not care much about your browser. ;)

rocknbil

5:15 pm on Feb 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well it is entirely possible that at some point in your script you have a blank value for your script and the browser is not sending back to it. I know this is confusing but let me try to exemplify:

$myScript = "test.cgi";

%qs = &query; ## Insert your read/parse routine here

if ($qs{'condition'}) { &condition1; }
else {

print "content-type: text/html\n\n";
print qq¦<a href="$myscript?condition=1">Send something</a>\n¦;
}

sub condition1 {
print "content-type: text/html\n\n";
print "Condition 1 sub";
}

Note the bolded typo - $myScript is not the same as $myscript. So the actual link being generated here is

<a href="?condition=1">Send something</a>

Some browsers will automatically post back to the originating location, in essence, test.cgi. Getting my drift? :-)

The specifics are hazy and I can't remember which browsers do this and which don't, so sorry if this is totally out of the ball park, but I've seen it before. It's worth it to check your links and view source on generated form pages to make sure the script location and directory paths are all correct.

Had someone with a database file issue a while back, I suspect his problem was similar.

Also check case structure of your file names too. Just in case. (awful pun, sory . . . )

Moby_Dim

6:31 pm on Feb 28, 2005 (gmt 0)

10+ Year Member



I can not understand this. A browser sends request to a server. The server founds the URL requested. Script works upon the request, using the parameters given. Server returns the response to the browser.

IMHO, if one browser gets the proper result, and another gets 404, the only question is - whether the script sniffs user agent or not? The script can send the proper response to 1-st browser, and "improper" to 2-nd. I guess dektek11's IE works in other cases (sites, scripts) properly?