Google
 
Web www.howardforums.com
Pages: 1

PERL on the 8125

(Click here to view the original thread with full colors/images)


Posted by: tbully

I am having troubles rendering a PERL script's HTML output on the 8125.

When the script gets called (Internet Explorer on the 8125 calling the script on the web server) it outputs the actual HTML that the PERL script built, instead of rendering it:

The Script (http://blah/Test.pl):
#!c:/perl/bin/Perl.exe –w
Print “
<html>
<body>
Hello World
</body>
</html>”;

The Output as it appears on the screen:
"<html>
<body>
Hello World
</body>
</html>”



Posted by: MrBlankOne

Have you tried using a different browser on the 8125 like opera or MiniMo? I ask because IE often presents itself as a mobile browser (WML/WAP).

Another thought (I havent tested it) is that you may need to include a !doctype.... entry before your html tag. See here for some examples.



Posted by: wierdo

You're not outputting HTTP headers, so the browser is showing it as plain text. Usually one would have all that taken care of by using the CGI class. Take particular care to send the proper MIME type, which in this case is text/html, since it's a plain html file. Modern browsers default (as they should!) to text/plain.

http://search.cpan.org/~lds/CGI.pm-3.20/CGI.pm would be helpful.



Posted by: tbully

Thanks to both of you. I am investigating both scenarios and will report back.

I assumed it should work as is because it work's OK on my PC's IE browser. I have learned in the past, however, that it is a pretty forgiving browser when doing sloppy coding.

As a side note:
I hate the fact that IE on WM5 presents itself as a WML browser with no way to stop it. I go to a couple of web sites often (national weather service for one) where I like to use their rich interfaces for radars and such. Instead, I get sent to their crappy text interface (for the detroit area) and only get to see text forecasts, etc.

Thanks again guys.



Posted by: IgwanaRob

Quote:
Originally Posted by tbully
As a side note:
I hate the fact that IE on WM5 presents itself as a WML browser with no way to stop it. I go to a couple of web sites often (national weather service for one) where I like to use their rich interfaces for radars and such. Instead, I get sent to their crappy text interface (for the detroit area) and only get to see text forecasts, etc.


Try this:

Quote:
Some websites will display an error stating that you have an unsupported web browser and that you should update to a newer browser.
In order to get around this go HKLM/SOFTWARE/MICROSOFT/ Windows/ Current Version/Internet Settings/5.0/User Agent/Version
Change Version to MSIE 6.0


(Quoted from wherever I originaly found it )



Posted by: tbully

Update:
Adding the headers worked. Thanks for the pointer.



Posted by: tbully

Igwanarob,

I looked at that key and it's already set to version MSIE 6.0. Maybe it's another value in the same area?



Posted by: IgwanaRob

Wish I could be of more help. Found that when I first got the phone, and don't remember if I had to change it or not (do a lot of manual tweaking). Most sites I've been to have the option to use the regular page instead of the mobile portal (Google lets you view full pages instead of their scaled down versions and saves the settings in a cookie)





vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
vB Easy Archive Final ©2000 - 2008 - Created by Stefan "Xenon" Kaeser