Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl output displays raw HTML

Status
Not open for further replies.

memberFDIC

Programmer
Jan 22, 2009
10
0
0
US
I have been running ActivePerl 5.6 on a Windows 2000 server for near a decade. Today I upgraded the server to Windows 2003. Then I deleted ActivePerl v 5.6 and installed the latest version.

The Perl code that used to run just fine now fails to execute properly. The problem I am having is that when the client browser displays a web page that contains a POST command to a Perl file on the server, the output that is presented to the client is displayed as raw HTML.

Any suggestions?
 
I'm assuming you are running iis.. it's a iis setting issue, I just don't remember what you need to change but you can google for it I'm sure.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
>> I'm assuming you are running iis.

Yes. IIS 6

>> it's a iis setting issue, I just don't
>> remember what you need to change

Since this is the very same server that ran the Perl code just fine prior to the upgrade from Windows 2000 to Windows 2003 Server, and since the upgrade doesn't change any IIS 5 settings when IIS 6 is installed, I have a hard time believing that it is a "IIS setting issue."

I've compared the current Windows 2003 Server IIS 6 settings with a second server (running ActivePerl and Windows 2000), and the IIS settings are the same.
Yet the way the Perl post results appear are different. One display the output as rendered HTML, where as the other displays raw HTML.
 
Well, IIS decides how it is going to handle the output. It decides if it is going to read the HTML and display it or if it is going just print the code to the page.

Are you sending correct headers along with your html source?
Are you using CGI or writing your own header information?

Does this work as a perl script?
Code:
print <<"END";
HTTP/1.0 200 OK
Content-Type: text/html

This is a PerlIS response.
END

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
If you want to verify your settings you could follow these steps to



but activestate should have set it correctly for you.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
>> Does this work as a perl script?

No, it does not. When placed on the server and accessed remotely via a web browser, this is the output that appears in the browser:

Content-type: text/html

'W:\mysite.org\web\test.pl' script produced no output


When you look at the Perl log, you find this error message:

Can't find string terminator "END" anywhere before EOF at W:\mysite.org\web\test.pl line 1.

>> Are you sending correct headers along with
>> your html source?

It beats me. The script were written by a Perl programmer. I'm not fluent in Perl. Regardless, these scripts worked perfectly prior to the Windows 2003 upgrade.

 
>> If you want to verify your settings you could
>> follow these steps to

We've followed them. It does not solve the problem. Output still appears as raw HTML in the user's client browser.


>> but activestate should have set it correctly for you

Obviously not. We ran the .MSI. The .MSI never added a "Web Service Extension" since there is nothing in the extensions related to Perl. I went ahead and added a Perl extension entry, stopped and restarted IIS, and the problem still exists.
 
One thing I have discovered...

The raw HTML output occurs when using Firefox 3.

If I run the script in Internet Explorer 8, the posted page appears rendered properly...with one exception...at the top of the browser window one sees the following text string:

Content-Type: text/html; charset=ISO-8859-1

This string has never appeared in the past when I was using Windows 2000 and ActivePerl 5.6.

I have also uninstalled ActivePerl 5.12, deleted the Registry entry, reinstalled ActivePerl 5.12, rebooted the server, and all the above problems still exist.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top