- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Perl CGI question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 08:23 AM
тАО07-29-2002 08:23 AM
Rack Layout
Everytime I attempt to use this link within Netscape I get the following error in the Apache error_log:
attempt to invoke directory as script: /
usr/local/apache/cgi-bin
Why isn't it using the full http all the way out to the image.cgi?
Thanks,
Jason
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 08:33 AM
тАО07-29-2002 08:33 AM
Re: Perl CGI question
What is the ServerRoot set to in ./conf/httpd.conf?
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 08:42 AM
тАО07-29-2002 08:42 AM
Re: Perl CGI question
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 08:49 AM
тАО07-29-2002 08:49 AM
Re: Perl CGI question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 09:25 AM
тАО07-29-2002 09:25 AM
SolutionCREATE a simple CGI called dummy.cgi in the /opt/apache/cgi-bin directory:
*** NOTE the CONTENT TYPE should say text/html
#!/usr/local/bin/perl
##
## Make sure you get the right PERL directory
##
print "Content-type: text/html\n\n";
print "TEST a CGI\n\n";
CHECK the permissions:
# ls -l /opt/apache/cgi-bin/dummy.cgi
-r-xr-xr-x 1 root sys 198 Jul 29 13:27 /opt/apache/cgi-bin/dummy.cgi
#
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 09:33 AM
тАО07-29-2002 09:33 AM
Re: Perl CGI question
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.
Thanks,
Jason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2002 09:36 AM
тАО07-29-2002 09:36 AM
Re: Perl CGI question
Probably:
print "Content-type: text/html\n\n";
The Content TYPE is important and the TWO carriage returns (/n/n) are the MOST important thing.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2002 05:44 AM
тАО07-30-2002 05:44 AM
Re: Perl CGI question
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.
CGI.pm is standard in every current Perl installation.
At the shell type "perldoc CGI".
Why would you want to use this module then?
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.
Especially when fiddling with parameters and user input.
CGI.pm has a fine param() method that takes the burden from you.
Please, also find out about Perl's taint checking (perldoc perlsec).
On a production webserver should no script be running without the -T flag.
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:
http://nms-cgi.sourceforge.net/
use it.