[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] perl permissions denied
- Subject: [cobalt-users] perl permissions denied
- From: "Robin Edgar, Tripany" <red@xxxxxxxxxxx>
- Date: Mon Aug 6 10:57:02 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hi, I was reading through the cobalt-users list and found your post
(2000-feb/005085)here:
---------------------------------------------------------------------------b
egin quote-------------
Hope I'm not explaining how to suck eggs here, but...
Here's a test cgi that I often use.
You could use it to check your system is running scripts ok.
###### the script starts on the next line
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><body>";
print "Ok, this is environment_test.cgi<br>";
while (($key, $value) = (each %ENV)) {
print "$key: $value<br>";
}
print "</body></html>";
###### the above line is the last line of the script
All it does is produce a page displaying the environment vars in your
browser.
on the RAQ the default location of perl is indicated in
#!/usr/bin/perl
If you changed that (I wouldn't) then edit that line to the correct
location.
Upload it to your site as a none binary file named 'environment_test.cgi'
into a
directory viewable to web browsers eg.
/home/sites/mysitenamegoeshere/web/testarea/environment_test.cgi
Set the permissions on the file to 755
Via telnet that is chmod 0755 environment_test.cgi
Via FTP use your ftp client menus (in cute ftp just right click on the file
and pick from the menu)
point your browser to mysitenamegoeshere/testarea/environment_test.cgi
And you should get to see it working ok with some useful info as a freebie.
Paul.
webmgr@xxxxxxxxxxxxxxxxxx
---------------------------------------------------------end
quote------------------
I tried this and no luck whatsover running even this script... tried
renaming the extension to .pl/.cgi, and definately uploaded as ascii but no
luck :( This is what I get:
CGIWrap Error: Script Execution Failed
CGIWrap encountered an error while attempting to execute this script:
Error Message: Exec format error
Error Number: 8
This message usually indicates there is a problem with the script itself.
Often this indicates either that the #! line of the script is incorrect, or
the script was uploaded in binary mode instead of ascii mode. Check to make
sure that the script does not have control-M's at the end of every line.
That will prevent it from executing. An easy fix that takes care of this
most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the
first line of the script.
If you are not the owner of this script, please forward this error and the
URL that caused it to the script owner. That is often the component in the
URL right after /cgiwrap/.
Local Information and Documentation:
Contact Name: Administrator
Contact EMail: admin
Server Data:
Server Administrator/Contact: admin
Server Name: www.vvdh.nl
Server Port: 80
Server Protocol: HTTP/1.1
Request Data:
User Agent/Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Request Method: GET
Remote Address: 213.84.24.228
Remote Port: 64459
Extra Path Info: /test_cgi.pl