All Test Scripts
- Script Location - require /cgi-bin/ or anywhere
- File Extensions and Contents
- All in /cgi-bin/ - Directory
- (PHP)
1. Script Location - require /cgi-bin/ or anywhere
Per default, Mac OS X does NOT allow execution of Perl-scripts expect in one
specific location, /Library/WebServer/CGI-Executables
.
1. | Script in /cgi-bin/printhello.pl. Should work also with default settings on Mac OS X (and Linux) |
output: | |
Output, one example
|
|
More -
- On 1&1
|
|
2. | Script in 'any' directory, e.g. printhello.pl (same as this file). Need some reconfig of webserver on Mac OS X (10.5) |
output: | |
Expected result: On Mac: Default: Failure (Internal Server Error); Reconfig: Ok; On 1&1: working fine | |
More -
- On 1&1
|
2. File Extensions, Content
All in local directory, i.e. web server must be configured for this (default setting on Mac OS X does NOT work - all would fail)
Script | Description | Expected result on Mac |
Output from Execution |
---|---|---|---|
printhello-dos.pl | DOS-style linebreaks; w/o -wT; i.e.#!/usr/bin/perl . |
Fails | |
printhello-dos-wT.pl | DOS-style linebreaks; w/ -wT; i.e.#!/usr/bin/perl -wT . |
Ok | |
printhello-mac.pl | Mac-style linebreaks | Failure (Internal Server Error) |
|
printhello-unix.pl | Unix-style linebreaks | Ok | |
printhello-unix-wT.pl | Unix-style linebreaks; w/ -wT#!/usr/bin/perl
-wT . |
Works on Mac; Fails on 1&1 |
|
printhello-unix-w -diagnostic.pl |
With use diagnostics; statement |
Failure (Internal Server Error) |
|
printhello-unix-local.pl | Assumes perl in /local/,
local /bin/perl -wT . |
Failure (Internal Server Error) |
|
printhello-unix-rw-only.pl | No execution flags, only read and write | Failure (Internal Server Error) |
3. All in /cgi-bin/ - Directory
At least .pl - should work. The other depend on server configuration (and actual availability of script... all may not be available depending on if logged-in and script links has been created; ln -s xxx yyy.)
Lang. | Ext. | Script | Description | Expect | Output from Execution |
---|---|---|---|---|---|
Perl | <none> | /cgi-bin/printhello | Unix-style linebreaks | failure | |
Perl | .bat | /cgi-bin/printhello.bat | With use diagnostics; statement |
failure | |
Perl | .cgi | /cgi-bin/printhello.cgi | Assumes perl in /local/,
local /bin/perl -wT . |
failure | |
Perl | .pl | /cgi-bin/printhello.pl | In /cgi-bin/ directory | should work | |
Perl | .plx | /cgi-bin/printhello.plx | No execution flags, only read and write | failure | |
.py | /cgi-bin/printhello.py | failure |
4. (PHP)
I.e. Not Perl but PHP.
> | printhello.php |
output: | |
Require enabling PHP support on Mac OS X (10.5) - not active by default. |
Updated 2008-08-25