- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
cgi on Cobalt RaQ
Collapse
X
-
Guest replied"This is UNIX-like, and this "outdated and outclassed" technology actually has some security which has I understand has been removed from more modern technology in the interest of improved ease of use. "
ah, i see!Leave a comment:
-
Guest repliedIt's a perfectly simple error message, the permission denied most likely refers to the web server not being able to read or execute the cgi script. I'd suggest you get a shell prompt up and look at the permission and set it to 555 or something similar. This is UNIX-like, and this "outdated and outclassed" technology actually has some security which has I understand has been removed from more modern technology in the interest of improved ease of use.Leave a comment:
-
Guest repliedTa guys - will give it a try.
I'm using outdated technology??? it all seemed spiffingly new fangled to me, didn't even have to feed the paper tape in first.Leave a comment:
-
Guest repliedI am not familiar with the raq - but most common problem with people writing cgi code is the lack of a http header. My guess is that in debug mode it puts a false header on to allow you to see all your headers ?
HTML is the format of the output document, but the delivery mechanism is http, which provides a header which allows among other things errors, redirects etc.
Typical format (Its about 4 years since I last did this - so forgive me if I am in error ) would be a response code 200 being OK (5xx are redirects, 4xx are errors, 2xx is it worked, plus others), protocol version and message then a mime content type, then a blank line followed by your output.
So :
200 HTTP/1.1 OK
Content-type: text/html
(HTML)
(BODY)
your current program output is everything from the (HTML) to the (/html) inclusive - using () because I dont thing ezboard allows html type tags in messages.
for cgi it needs to also provide the header
...
(/BODY)
(/HTML)
If you try doing a telnet to a web server on port 80 and type get index.html (return) you will see the header as well as the output.
http has lots of other headers defined but I think that this is the absolute mimimum
modify your code to do
print "200 HTTP/1.1 OK\nContent-type: text/html\n\n"
(actually might need \n\r - cant remember...)
The header is interpreted by the web browser and allows it to decide how to process the following data stream. You might need a Content-length: header as well - but I think that is optional these days most browsers should just take what they getLeave a comment:
-
Guest repliedsorry x, don't know the stuff....serves you right for using an outdated, outclassed technology
but thoughts...what account is executing the script? are permissions set on the server as well at dir level? what server is it?Leave a comment:
-
Guest started a topic cgi on Cobalt RaQcgi on Cobalt RaQ
Can any of you web experts help with a beginner's cgi problem. I cannot even get past first base and execute even the simplest script on a Cobalt RaQ server? e.g.:-
#!/usr/bin/perl
print "<HTML></HTML>\n";
I get:
CGIWrap encountered an error while attempting to execute this script:
Error Message: Permission denied
Error Number: 13
The site setup says cgi execution is enabled.
It has been uploaded in ASCII as site admin.
Permissions of file and directory set to read/write/execute.
The script runs ok in site debug (using the /cgiwrapDir/cgiwrapd/ thing).
Tried in various different directories, cgi-bin etc. although that's not supposed to matter with Cobalt RaQ.
Have tried putting /perl--.
Have tried stripping out CRs (char 13) in hex editor.
Absolutely bugger all works. Any suggestions gratefully received.
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: