Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: CGI/PERL from YUI

Expand Messages
  • J Zivan
    Check your web server to see if the MIME type for a *.PL file is restricted. This would give you an error.
    Message 1 of 15 , Jun 30, 2009
    • 0 Attachment
      Check your web server to see if the MIME type for a *.PL file is
      restricted. This would give you an error.



      On Tue, Jun 30, 2009 at 11:58 AM, John Doe<learningyui@...> wrote:
      >
      >
      > http://localhost/ test.pl directly into the browser is giving me an Internal
      > Server Error. I CAN run this script directly from the command line, so I
      > know that the Perl file should be OK...
      >
      > Any other ideas?
      > ________________________________
      > From: Satyam <satyam@...>
      > To: ydn-javascript@yahoogroups.com
      > Sent: Tuesday, June 30, 2009 11:27:45 AM
      > Subject: Re: [ydn-javascript] Re: CGI/PERL from YUI
      >
      > Then, it might be the second possibility I mentioned. Try this URL in
      > your browser:
      >
      > http://localhost/ test.pl
      >
      > If you get the source code, then you don't have perl properly installed
      > as a script engine in your web server.
      >
      > Satyam
      >
      > John Doe escribió:
      >>
      >>
      >> http://localhost/ AJAXTest. html is giving me the code from the Perl file.
      >> I know not to simply double click on the file, as that will not
      >> properly run it.
      >> Based on the URL above, I believe that I AM going through the web server.
      >>
      >> Any suggestions?
      >>
      >> Thanks!
      >>
      >> ------------ --------- --------- --------- --------- --------- -
      >> *From:* Satyam <satyam@satyam. com.ar>
      >> *To:* ydn-javascript@ yahoogroups. com
      >> *Sent:* Tuesday, June 30, 2009 10:29:48 AM
      >> *Subject:* Re: [ydn-javascript] Re: CGI/PERL from YUI
      >>
      >> Try the same URL from the browser window. If it returns the code of the
      >> perl file, it means that you are not passing through the web server or
      >> that you don't have the perl interpreter installed properly. Most
      >> likely it is the first option. If you are just double clicking on the
      >> .html file below, then the URL for that file will be of the form:
      >>
      >> file:///c/wwwroot/ whatever/ mytest.html
      >>
      >> The important part here is the file:. That means you are not going
      >> through the web server, it is the file system of your local machine the
      >> one serving you the file. The file system knows nothing but opening
      >> files. Just as it provided you with the html file, it will also give you
      >> the test.pl <http://test. pl> file, just the file, it won't do anything
      >> else. Now, if
      >> you execute the file via localhost:
      >>
      >> http://localhost/ whatever/ mytest.html
      >>
      >> then it is going through the web server, and then your test.pl file will
      >> also go through the web server, if properly configured, would know what
      >> to do with the perl file.
      >>
      >> Satyam
      >>
      >> learningyui escribió:
      >> > This is what I have currently. This call returns me the code from
      >> the Perl file, instead of the value 10 which should be returned? Any
      >> suggestions?
      >> >
      >> > Thanks.
      >> >
      >> >
      >> > <html>
      >> > <head>
      >> > <title>Test Calling PERL</title>
      >> >
      >> > <!-- Combo-handled YUI JS files: -->
      >> > <script type="text/javascri pt" src="http://yui.yahooapi
      >> s.com/combo? 2..7.0/build/ yahoo-dom- event/yahoo- dom-event.
      >> js&2.7.0/ build/connection /connection- min.js
      >> <http://yui.yahooapi s.com/combo? 2.7.0/build/ yahoo-dom- event/yahoo-
      >> dom-event. js&2..7.0/ build/connection /connection- min..js>"></script>
      >> >
      >> > <script language="javascrip t" type="text/javascri pt">
      >> >
      >> > function success_handler( o) {
      >> > document.getElement ById('content' ).innerHTML = o.responseText;
      >> > }
      >> >
      >> > function failure_handler( o) {
      >> > document..getElemen t ById('content' ).innerHTML = 'Server or your
      >> connection is dead';
      >> > }
      >> >
      >> > function send_request( ) {
      >> > var callback = { success:success_ handler, failure:failure_ handler,
      >> timeout: 10000 };
      >> >
      >> > YAHOO.util.Connect. asyncRequest( 'GET', 'test.pl', callback);
      >> > }
      >> >
      >> > function test_failure( ) {
      >> > var callback = { success:success_ handler, failure:failure_ handler,
      >> timeout: 10000 };
      >> > YAHOO.util.Connect. asyncRequest( 'GET', 'test.pl', callback);
      >> > }
      >> >
      >> > </script>
      >> >
      >> > </head>
      >> > <body>
      >> > <a href="javascript: send_request( );">Send Request</a> | <a
      >> href="javascript: test_failure( );">Fail a request</a>
      >> > <div id="content" >
      >> > </div>
      >> > </body>
      >> > </html>
      >> >
      >> >
      >> >
      >> > ------------ --------- --------- ------
      >> >
      >> > Yahoo! Groups Links
      >> >
      >> >
      >> >
      >> > ------------ --------- --------- --------- --------- --------- -
      >> >
      >> >
      >> > No virus found in this incoming message.
      >> > Checked by AVG - www.avg.com <http://www.avg. com>
      >> > Version: 8.5.375 / Virus Database: 270.13.0/2209 - Release Date:
      >> 06/29/09 14:43:00
      >> >
      >> >
      >>
      >>
      >>
      >>
      >>
      >> ------------ --------- --------- --------- --------- --------- -
      >>
      >>
      >> No virus found in this incoming message.
      >> Checked by AVG - www.avg.com
      >> Version: 8.5..375 / Virus Database: 270.13.0/2209 - Release Date: 06/29/09
      >> 14:43:00
      >>
      >>
      >
      >
    • Brian McCullough
      ... I presume that that space before test.pl isn t really there. Which web server are you using? Brian
      Message 2 of 15 , Jun 30, 2009
      • 0 Attachment
        On Tue, Jun 30, 2009 at 08:58:32AM -0700, John Doe wrote:
        > http://localhost/ test.pl directly into the browser is giving me an Internal Server Error. I CAN

        I presume that that space before "test.pl" isn't really there.

        Which web server are you using?


        Brian
      • Brian McCullough
        ... I m sorry. There should be no spaces between the http and the .pl . Brian
        Message 3 of 15 , Jun 30, 2009
        • 0 Attachment
          On Tue, Jun 30, 2009 at 08:57:48AM -0700, John Doe wrote:
          > http://localhost/ test.pl directly into the browser is giving me an Internal Server Error. I CAN run this script directly from the command line, so I know that the Perl file should be OK...


          I'm sorry. There should be no spaces between the "http" and the ".pl".


          Brian
        • John Doe
          There are NO spaces: http://linuxvm/cgi-bin/Eric/testperl.pl (linuxvm is my localhost - set up correctly - I have been using the linuxvm instead of localhost
          Message 4 of 15 , Jun 30, 2009
          • 0 Attachment
            There are NO spaces:

            http://linuxvm/cgi-bin/Eric/testperl.pl   (linuxvm is my localhost - set up correctly - I have been using the linuxvm instead of localhost for a while)

            give me the following:

            Internal Server Error

            The server encountered an internal error or misconfiguration and was unable to complete your request.

            Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

            More information about this error may be available in the server error log.


            Apache/2.0.52 (Fedora) Server at fedora3 Port 80



            From: Brian McCullough <bdmc@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Tuesday, June 30, 2009 12:18:21 PM
            Subject: Re: [ydn-javascript] Re: CGI/PERL from YUI

            On Tue, Jun 30, 2009 at 08:57:48AM -0700, John Doe wrote:
            > http://localhost/ test.pl directly into the browser is giving me an Internal Server Error. I CAN run this script directly from the command line, so I know that the Perl file should be OK...

            I'm sorry. There should be no spaces between the "http" and the ".pl".

            Brian


          • Satyam
            The error message below says it all. The problem has nothing to do with YUI, sever misconfiguration or whatever but on the server side. Go to the appropriate
            Message 5 of 15 , Jun 30, 2009
            • 0 Attachment
              The error message below says it all. The problem has nothing to do with
              YUI, sever misconfiguration or whatever but on the server side. Go to
              the appropriate forum.

              Satyam


              John Doe escribió:
              >
              >
              > There are NO spaces:
              >
              > http://linuxvm/cgi-bin/Eric/testperl.pl (linuxvm is my localhost -
              > set up correctly - I have been using the linuxvm instead of localhost
              > for a while)
              >
              > give me the following:
              >
              >
              > Internal Server Error
              >
              > The server encountered an internal error or misconfiguration and was
              > unable to complete your request.
              >
              > Please contact the server administrator, root@localhost and inform
              > them of the time the error occurred, and anything you might have done
              > that may have caused the error.
              >
              > More information about this error may be available in the server error
              > log.
              >
              > ------------------------------------------------------------------------
              > Apache/2.0.52 (Fedora) Server at fedora3 <mailto:root@localhost> Port 80
              >
              >
              >
              > ------------------------------------------------------------------------
              > *From:* Brian McCullough <bdmc@...>
              > *To:* ydn-javascript@yahoogroups.com
              > *Sent:* Tuesday, June 30, 2009 12:18:21 PM
              > *Subject:* Re: [ydn-javascript] Re: CGI/PERL from YUI
              >
              > On Tue, Jun 30, 2009 at 08:57:48AM -0700, John Doe wrote:
              > > http://localhost/ test.pl <http://test.pl> directly into the browser
              > is giving me an Internal Server Error. I CAN run this script directly
              > from the command line, so I know that the Perl file should be OK...
              >
              > I'm sorry. There should be no spaces between the "http" and the ".pl".
              >
              > Brian
              >
              >
              >
              >
              >
              > ------------------------------------------------------------------------
              >
              >
              > No virus found in this incoming message.
              > Checked by AVG - www.avg.com
              > Version: 8.5.375 / Virus Database: 270.13.1/2211 - Release Date: 06/30/09 11:37:00
              >
              >
            • jarret.minkler@gmail.com
              If you hit the cgi from the browser what response do you get? Sent from my Verizon Wireless BlackBerry
              Message 6 of 15 , Jun 30, 2009
              • 0 Attachment
                If you hit the cgi from the browser what response do you get?
                Sent from my Verizon Wireless BlackBerry
              Your message has been successfully submitted and would be delivered to recipients shortly.