<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl CGI question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774838#M722376</link>
    <description>&lt;BR /&gt;What is the ServerRoot set to in ./conf/httpd.conf?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
    <pubDate>Mon, 29 Jul 2002 15:33:56 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2002-07-29T15:33:56Z</dc:date>
    <item>
      <title>Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774837#M722375</link>
      <description>I have recently installed Apache web server on one of our A class test boxes.  I am trying to write a simplistic Perl CGI script that will have a set of HTML links on a main page.  I have the following line in the script to achieve the link:&lt;BR /&gt; &lt;A href="http://servername/usr/local/apache/cgi-bin/image.cgi" target="_blank"&gt;&lt;BR /&gt;Rack Layout&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Everytime I attempt to use this link within Netscape I get the following error in the Apache error_log:&lt;BR /&gt;attempt to invoke directory as script: /&lt;BR /&gt;usr/local/apache/cgi-bin&lt;BR /&gt;&lt;BR /&gt;Why isn't it using the full http all the way out to the image.cgi?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jason</description>
      <pubDate>Mon, 29 Jul 2002 15:23:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774837#M722375</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-07-29T15:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774838#M722376</link>
      <description>&lt;BR /&gt;What is the ServerRoot set to in ./conf/httpd.conf?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 29 Jul 2002 15:33:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774838#M722376</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-07-29T15:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774839#M722377</link>
      <description>Harry,&lt;BR /&gt;&lt;BR /&gt;ServerRoot is set to /usr/local/apache&lt;BR /&gt;&lt;BR /&gt;I have tried the following line in the script to no avail:&lt;BR /&gt;&lt;A href="http://servername/cgi-bin/image.cgi" target="_blank"&gt;&lt;BR /&gt;&lt;/A&gt;</description>
      <pubDate>Mon, 29 Jul 2002 15:37:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774839#M722377</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-07-29T15:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774840#M722378</link>
      <description>What about your ScriptAlias section?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 29 Jul 2002 15:42:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774840#M722378</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-07-29T15:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774841#M722379</link>
      <description>The ScriptAlias line is set to: ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"</description>
      <pubDate>Mon, 29 Jul 2002 15:49:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774841#M722379</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-07-29T15:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774842#M722380</link>
      <description>Try this SIMPLE test:&lt;BR /&gt;&lt;BR /&gt;CREATE a simple CGI called dummy.cgi in the /opt/apache/cgi-bin directory:&lt;BR /&gt;&lt;BR /&gt;*** NOTE the CONTENT TYPE should say text/html&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/local/bin/perl&lt;BR /&gt;## &lt;BR /&gt;## Make sure you get the right PERL directory&lt;BR /&gt;##&lt;BR /&gt;&lt;BR /&gt;print "Content-type: text/html\n\n";&lt;BR /&gt;print "&lt;A href="\&amp;quot;/cgi-bin/test-cgi\&amp;quot;" target="_blank"&gt;TEST a CGI&lt;/A&gt;\n\n";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CHECK the permissions:&lt;BR /&gt;# ls -l /opt/apache/cgi-bin/dummy.cgi &lt;BR /&gt;-r-xr-xr-x   1 root       sys            198 Jul 29 13:27 /opt/apache/cgi-bin/dummy.cgi&lt;BR /&gt;# &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 29 Jul 2002 16:25:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774842#M722380</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-07-29T16:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774843#M722381</link>
      <description>Harry,&lt;BR /&gt;&lt;BR /&gt;That worked without a problem.  I substituted the test-cgi with my image.cgi and that also worked.  As of yet I am not sure what exactly was wrong with my syntax, but this gives me something to compare with.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Jason</description>
      <pubDate>Mon, 29 Jul 2002 16:33:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774843#M722381</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-07-29T16:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774844#M722382</link>
      <description>&lt;BR /&gt;Probably:&lt;BR /&gt;&lt;BR /&gt;print "Content-type: text/html\n\n"; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The Content TYPE is important and the TWO carriage returns (/n/n) are the MOST important thing.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 29 Jul 2002 16:36:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774844#M722382</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-07-29T16:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Perl CGI question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774845#M722383</link>
      <description>Hi Jason,&lt;BR /&gt;&lt;BR /&gt;if it wasn't only for testing your webserver's cgi capability, and you are interested in doing some more CGI stuff with Perl, I can strongly recommend to use the fine CGI.pm module by Lincoln Stein.&lt;BR /&gt;CGI.pm is standard in every current Perl installation.&lt;BR /&gt;At the shell type "perldoc CGI".&lt;BR /&gt;&lt;BR /&gt;Why would you want to use this module then?&lt;BR /&gt;Because there is so much rotten Perl CGI code floating around that usage of these scripts (like self written URL decoding parsers) can open security holes.&lt;BR /&gt;Especially when fiddling with parameters and user input.&lt;BR /&gt;CGI.pm has a fine param() method that takes the burden from you.&lt;BR /&gt;Please, also find out about Perl's taint checking (perldoc perlsec).&lt;BR /&gt;On a production webserver should no script be running without the -T flag.&lt;BR /&gt;&lt;BR /&gt;There was in fact so much dubious Perl CGI code (like those from Matt Wright) that proficient Perl developers saught for a replacement and came up with this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://nms-cgi.sourceforge.net/" target="_blank"&gt;http://nms-cgi.sourceforge.net/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;use it.</description>
      <pubDate>Tue, 30 Jul 2002 12:44:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-cgi-question/m-p/2774845#M722383</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2002-07-30T12:44:41Z</dc:date>
    </item>
  </channel>
</rss>

