Not sure if I should update like this so apologies if its duff form:
Proper ticks, header line with \n\n - and a sensible path. It worked.
Thanks very much for all the info folks. I have extra question:
My aim is to run a script from a link (turning the radio back to my favourite channel after colleagues put on handbag house channels and go home)
These are the commands I thought would work - but they dont.
system('bash /Library/WebServer/CGI-Executables/radio.sh ');
#system('osascript /Applications/radioscripts/Switch_iTunes_Subflow.ap
+p');
#system('osascript /Library/WebServer/CGI-Executables/Switch_iTunes_Su
+bflow.app');
The bash.sh works from a shell & I have given ownership to "www"
original Post:::
Hello Monks - may I request some "local knowledge":
This works on my ISP managed online server but how do I make it work on my local mac box (trying to setup some housekeeping scripts initiated by local browser link ) ?
Apache error log says : Premature end of script headers: /Library/WebServer/CGI-Executables/radio.pl
#! /usr/bin/perl
use strict;
use CGI qw(:standard);
use Fcntl qw(:DEFAULT :flock);
system(`mkdir /cgi-bin/NEW`);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.