Re: [analog-help] IE not running Perl
On Wednesday, October 24, 2007 7:18 PM [EDT], Jeremy Wadsack <[EMAIL PROTECTED]> wrote: You can't make this change in anlgform.pl - it's encoded into analog under the 'CGI' behavior. In fact, all anlgform.pl does is put a protective wrapper around Analog (as well as the form parsing) for CGI use. Also, to clarify Aengus's statement, I don't believe that adding a Content-type header output in anlgform.pl will help as Analog will still output it's own and I'm pretty certain that if more than one of the same header is read, browsers generally take the last one. You'll have to hack to source code to change this, or get into the web server and override it. I can't recall for certain, but IIS may have some ability to override headers from CGI's. The Content-type: header is generated by outxhtml.c (or outhtml.c or outplain.c, etc) , and it only generates it if Analog is called with CGI ON. If you modify anlgform.pl so that it doesn't set CGI ON, then analog will generate the output without the header. You can then generate the header in anlgform.pl. CGI ON mode also does some other important stuff though - it assumes that parameters entered through a web form are untrusted, and escapes some characters before using them, so this is an unsafe way to tackle the problem. Overriding the header at the server level isn't really a satisfactory solution either - unless you have a module that is smart enough to only over-ride it for IE browsers. IIS definitely provides support for filters that can do that sort of thing, but it's beyond my abilities, though it's a generic enough problem that someone might have written such a filter already. Aengus + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
RE: [analog-help] IE not running Perl
> Why a Web utility would default to outputting in application/* > instead of text/* I cannot fathom. Because this is the recommended approach according to W3C's 2002 guidelines: http://www.w3.org/TR/xhtml-media-types/#application-xhtml-xml > >There are a couple of different ways to deal with this problem. The > >simplest is to set OUTPUT HTML in the analog.cfg, which changes the > >output for everyone. A slightly better solution might be to modify > >anlgform.pl to set OUTPUT HTML when it is called from IE. A better > >solution would be for anlgform.pl to return "Content-Type: text/html" > >for IE browsers, while still generating the XHTML output. It shouldn't > >be too hard to do, but I can barely read perl, never mind write the > >stuff! > > I wanted to edit the script to upgrade all the XHTML code to HTML 4 > (the ideal solution), but it seemed that the "magic" was being called > from elsewhere, and was not actually in anlgform.pl itself. I assumed > it was hardcoded into Analog's compiled file, but if it's external > then I would appreciate if someone could identify the relevant text > file(s) and their location You can't make this change in anlgform.pl - it's encoded into analog under the 'CGI' behavior. In fact, all anlgform.pl does is put a protective wrapper around Analog (as well as the form parsing) for CGI use. Also, to clarify Aengus's statement, I don't believe that adding a Content-type header output in anlgform.pl will help as Analog will still output it's own and I'm pretty certain that if more than one of the same header is read, browsers generally take the last one. You'll have to hack to source code to change this, or get into the web server and override it. I can't recall for certain, but IIS may have some ability to override headers from CGI's. -- Jeremy Wadsack Seven Simple Machines + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
Re: [analog-help] IE not running Perl
At 05:43 p -0400 10/24/2007, Aengus didst inscribe upon an electronic papyrus: It appears that IE6 doesn't recognize the application/xhtml+xml Mime type, (this appears to be "widely known" but not not explicitly documented anywhere). As far as I can tell, IE7 doesn't recognize it either. IE will display the XHTML pages that Analog produces - if it didn't, the issue would have been addressed a long time ago! But because IE doesn't know to do when it receives "Content-Type: application/xhtml+xml" from the web server, it prompts the users to save the file instead of displaying it. Why a Web utility would default to outputting in application/* instead of text/* I cannot fathom. According to http://analog.cx/docs/whatsnew.html, XHTML has been the default output for Analog since March 2003 :-). XHTML is the stupidest th-- oops I already ranted here, didn't I. :-) There are a couple of different ways to deal with this problem. The simplest is to set OUTPUT HTML in the analog.cfg, which changes the output for everyone. A slightly better solution might be to modify anlgform.pl to set OUTPUT HTML when it is called from IE. A better solution would be for anlgform.pl to return "Content-Type: text/html" for IE browsers, while still generating the XHTML output. It shouldn't be too hard to do, but I can barely read perl, never mind write the stuff! I wanted to edit the script to upgrade all the XHTML code to HTML 4 (the ideal solution), but it seemed that the "magic" was being called from elsewhere, and was not actually in anlgform.pl itself. I assumed it was hardcoded into Analog's compiled file, but if it's external then I would appreciate if someone could identify the relevant text file(s) and their location TIA, -boo + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
Re: [analog-help] IE not running Perl
Rajamanickam S. <[EMAIL PROTECTED]> wrote: > Many thanks Aengus. > > After adding the line > > OUTPUT HTML > > as you said, in to the analog.cfg, the report page now opens in IE. I just tried running anlgform.pl at the command line, and, with default settings, this is what the ouput looks like: C:\Analog>anlgform.pl Content-Type: application/xhtml+xml; charset=ISO-8859-1 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml";> . If I modify the analog.cfg file to specify OUTPUT HTML, then the Content-Type: header is different: C:\Analog>anlgform.pl Content-Type: text/html; charset=ISO-8859-1 The Content-Type: header is generated by Analog if CGI ON is set. It appears that IE6 doesn't recognize the application/xhtml+xml Mime type, (this appears to be "widely known" but not not explicitly documented anywhere). As far as I can tell, IE7 doesn't recognize it either. IE will display the XHTML pages that Analog produces - if it didn't, the issue would have been addressed a long time ago! But because IE doesn't know to do when it receives "Content-Type: application/xhtml+xml" from the web server, it prompts the users to save the file instead of displaying it. According to http://analog.cx/docs/whatsnew.html, XHTML has been the default output for Analog since March 2003 :-). There are a couple of different ways to deal with this problem. The simplest is to set OUTPUT HTML in the analog.cfg, which changes the output for everyone. A slightly better solution might be to modify anlgform.pl to set OUTPUT HTML when it is called from IE. A better solution would be for anlgform.pl to return "Content-Type: text/html" for IE browsers, while still generating the XHTML output. It shouldn't be too hard to do, but I can barely read perl, never mind write the stuff! Aengus + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
RE: [analog-help] IE not running Perl
Many thanks Aengus. After adding the line OUTPUT HTML as you said, in to the analog.cfg, the report page now opens in IE. Thanks, Shivram Rajamanickam. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aengus Sent: 15 October 2007 12:36 To: Support for analog web log analyzer Subject: Re: [analog-help] IE not running Perl On Monday, October 15, 2007 6:31 AM [EDT], Rajamanickam S. <[EMAIL PROTECTED]> wrote: > Hi all > > I would like to raise this issue again but progressed a bit with a > different approach. The problem that IE opens 'Unknown file type' > dialog box to save/open the executed .pl file is (may be) because of > the apache server returns with application/xhtml+xml content-type > header. Have you tried adding OUTPUT HTML to your analog.cfg file, so that anlgform.pl doesn't produce XHTML output? Aengus + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general + + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
Re: [analog-help] IE not running Perl
Am 15.10.2007 um 13:36 schrieb Aengus: The problem is that a number of people have reported that when they set up the anlgform.pl script to allow the creation of "on demand" log analyses, when you click the "Produce statistics" button in IE, you are prompted to save the response, instead of it being displayed in the browser. Firefox dispays the output. ah, of course. I misunderstood the question. Still very odd that apache is setting the header rather than the perl script. Does renaming the file to .cgi help? Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
Re: [analog-help] IE not running Perl
On Monday, October 15, 2007 6:43 AM [EDT], Charlie Clark <[EMAIL PROTECTED]> wrote: This has nothing to do with Analog. You should post to an Apache list. However, if I understand things correctly you shouldn't be using the rewrite module at all as you only need to set the mime type correctly to text/plain. The bigger question is why do you want .pl to display in the browser? Perl files are usually executable and handle their own headers. The problem is that a number of people have reported that when they set up the anlgform.pl script to allow the creation of "on demand" log analyses, when you click the "Produce statistics" button in IE, you are prompted to save the response, instead of it being displayed in the browser. Firefox dispays the output. Aengus + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
Re: [analog-help] IE not running Perl
On Monday, October 15, 2007 6:31 AM [EDT], Rajamanickam S. <[EMAIL PROTECTED]> wrote: Hi all I would like to raise this issue again but progressed a bit with a different approach. The problem that IE opens 'Unknown file type' dialog box to save/open the executed .pl file is (may be) because of the apache server returns with application/xhtml+xml content-type header. Have you tried adding OUTPUT HTML to your analog.cfg file, so that anlgform.pl doesn't produce XHTML output? Aengus + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
Re: [analog-help] IE not running Perl
Am 15.10.2007 um 12:31 schrieb Rajamanickam S.: Hi all I would like to raise this issue again but progressed a bit with a different approach. The problem that IE opens 'Unknown file type' dialog box to save/open the executed .pl file is (may be) because of the apache server returns with application/xhtml+xml content- type header. This has nothing to do with Analog. You should post to an Apache list. However, if I understand things correctly you shouldn't be using the rewrite module at all as you only need to set the mime type correctly to text/plain. The bigger question is why do you want .pl to display in the browser? Perl files are usually executable and handle their own headers. Good luck! Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
RE: [analog-help] IE not running Perl
Hi all I would like to raise this issue again but progressed a bit with a different approach. The problem that IE opens 'Unknown file type' dialog box to save/open the executed .pl file is (may be) because of the apache server returns with application/xhtml+xml content-type header. After confirming this with outputting in curl, I tried to configure httpd.conf in apache as reported in other articles/forums but still cannot get the desired report page to be displayed. FYI, here is the excerpt from the httpd.conf RewriteEngine on RewriteCond %{REQUEST_URI} \.xhtml$ RewriteCond %{HTTP_USER_AGENT} .*MSIE.* [OR] RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml\s*;\s*q=0\.?0*(\s|,|$) RewriteRule .* - [T=text/html] Did any one using analog faced a similar situation or those who using apache server with analog, can you check whether it is working when you query the analog using the web page in Internet Explorer please? Please shed your views if I am wrong anywhere too. Many thanks Shivram Rajamanickam -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aengus Sent: 19 July 2007 15:45 To: Support for analog web log analyzer Subject: Re: [analog-help] IE not running Perl Rajamanickam S. <[EMAIL PROTECTED]> wrote: > It works fine with firefox as the server understands perl being called > and runs them to show the output. But, it is not working with Internet > Explorer as it pops the save/download window. That sounds like a problem with MIME types. I'd suggest using a command line tool line like wget or curl to see the full headers being returned by the web server - the web browser uses that information to decide how to handle the response. Aengus + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general + Thanks Aengus. Now I have resolved the first issue, I mean the problem with the pie charts. I wrongly understood the purpose of CHARTDIR and LOCALCHARTDIR as I assumed LOCALCHARTDIR is an alternative image directory and thats why I specified completely different paths for both the commands. Anyway, now after pointing them correctly, it worked. But still, I need something to do with the second issue, the browser/server running perl. It works fine with firefox as the server understands perl being called and runs them to show the output. But, it is not working with Internet Explorer as it pops the save/download window. Here again, I have attached the bit from httpd.conf for asking to execute perl AddHandler cgi-script cgi pl ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" Options +ExecCGI +FollowSymLinks AllowOverride None Order allow,deny Allow from all Can anyone please give any idea to solve this? Thanks Shiv. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aengus Sent: 19 July 2007 11:36 To: Support for analog web log analyzer Subject: Re: [analog-help] Request Pie Chart for same page but different args On Thursday, July 19, 2007 5:07 AM [EDT], Rajamanickam S. <[EMAIL PROTECTED]> wrote: > Right.. Now I looked in the paths specified in both CHARTDIR and > LOCALCHARTDIR which I set to > > CHARTDIR "/icons/analog_images/" > LOCALCHARTDIR "C:\Downloads\analog 6.0\pngs\" > > The req.png file in the LOCALCHARTDIR path is showing the correct pie > chart (the expected pie chart with the same url but with different > arguments) BUT the one in the CHARTDIR is showing the wrong one and > this is the pie chart which is displayed in the request report. > > Did I made anything wrong in specifying the chart directories? Anaog doesn't know anything about the structure of your web server, so CHARTDIR is basically substituted directly into the IMG SRC tag in the HTML file that Analog generates. It tells your web browser what the web path to the images is. Usually, if Report.html is in \analog\ and LOCALCHARTDIR is in \analog\pngs, the CHARTDIR will be pngs\ (or .\pngs\). > FYI, I am using Apache server and the chart directory > /icons/analog_images is inside the Apache directory. But that's not where you told Ananlog to put the charts that it generates, unless you've told Apache to map /icons/analog_images to C:\Downloads\analog 6.0\pngs\ > And also an other quick and completely different issue. If I use > Internet explorer to view anlgform.html and if I submit the form, it > doesn't run perl, instead it pops up a save/download window to sa
Re: [analog-help] IE not running Perl
Rajamanickam S. <[EMAIL PROTECTED]> wrote: > It works fine with firefox as the server understands perl being called > and runs them to show the output. But, it is not working with Internet > Explorer as it pops the save/download window. That sounds like a problem with MIME types. I'd suggest using a command line tool line like wget or curl to see the full headers being returned by the web server - the web browser uses that information to decide how to handle the response. Aengus + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +
Re: [analog-help] IE not running Perl
Have you tried running other perl scripts on the server? Usually there are a few examples in the cgi-bin directory or a quick search on the 'net can usually find a basic one. Do they work? If they do - do they still work if you move one to the same place as anlgform.pl (if its in a different place to cgi-bin)? Rgds Alan Wright IT Support Technician Faculty of Education, Health & Sciences University of Derby Western Road, Mickleover, DE3 9GX http://psychology.derby.ac.uk At 14:40 19/07/2007, you wrote: Thanks Aengus. Now I have resolved the first issue, I mean the problem with the pie charts. I wrongly understood the purpose of CHARTDIR and LOCALCHARTDIR as I assumed LOCALCHARTDIR is an alternative image directory and thats why I specified completely different paths for both the commands. Anyway, now after pointing them correctly, it worked. But still, I need something to do with the second issue, the browser/server running perl. It works fine with firefox as the server understands perl being called and runs them to show the output. But, it is not working with Internet Explorer as it pops the save/download window. Here again, I have attached the bit from httpd.conf for asking to execute perl AddHandler cgi-script cgi pl ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" Options +ExecCGI +FollowSymLinks AllowOverride None Order allow,deny Allow from all Can anyone please give any idea to solve this? Thanks Shiv. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aengus Sent: 19 July 2007 11:36 To: Support for analog web log analyzer Subject: Re: [analog-help] Request Pie Chart for same page but different args On Thursday, July 19, 2007 5:07 AM [EDT], Rajamanickam S. <[EMAIL PROTECTED]> wrote: > Right.. Now I looked in the paths specified in both CHARTDIR and > LOCALCHARTDIR which I set to > > CHARTDIR "/icons/analog_images/" > LOCALCHARTDIR "C:\Downloads\analog 6.0\pngs\" > > The req.png file in the LOCALCHARTDIR path is showing the correct pie > chart (the expected pie chart with the same url but with different > arguments) BUT the one in the CHARTDIR is showing the wrong one and > this is the pie chart which is displayed in the request report. > > Did I made anything wrong in specifying the chart directories? Anaog doesn't know anything about the structure of your web server, so CHARTDIR is basically substituted directly into the IMG SRC tag in the HTML file that Analog generates. It tells your web browser what the web path to the images is. Usually, if Report.html is in \analog\ and LOCALCHARTDIR is in \analog\pngs, the CHARTDIR will be pngs\ (or .\pngs\). > FYI, I am using Apache server and the chart directory > /icons/analog_images is inside the Apache directory. But that's not where you told Ananlog to put the charts that it generates, unless you've told Apache to map /icons/analog_images to C:\Downloads\analog 6.0\pngs\ > And also an other quick and completely different issue. If I use > Internet explorer to view anlgform.html and if I submit the form, it > doesn't run perl, instead it pops up a save/download window to save > anlgform.pl > > I have configured the httpd.conf in apache such that > > AddHandler cgi-script cgi pl ... > Could you please clarify these couple of queries please? I'm going to pass on that one - it's been a couple of years since I set up anlgform.pl on Apache, and I don't really remember the details. I'm sure someone else will have an answer. Aengus +--- - | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +--- - + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general + __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.anal
Re: [analog-help] IE not running Perl
At 02:40 p +0100 07/19/2007, Rajamanickam S. didst inscribe upon an electronic papyrus: But still, I need something to do with the second issue, the browser/server running perl. It works fine with firefox as the server understands perl being called and runs them to show the output. But, it is not working with Internet Explorer as it pops the save/download window. Oh yeah, I know someone else who has the same problem on a PC. This is running it (or trying to) remotely; i.e., over HTTP. + | TO UNSUBSCRIBE from this list: |http://lists.meer.net/mailman/listinfo/analog-help | | Analog Documentation: http://analog.cx/docs/Readme.html | List archives: http://www.analog.cx/docs/mailing.html#listarchives | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general +