らぶりぃメモトップページに戻る】【更新

_『Apache/2でのスクリプト実行環境』 2003-04-04 (Fri) 13:16:13

>Yes, but it's a text file (much the same as a .cmd file). OS/2 cannot run these
>(i.e. give it to DosExecPgm). You need to launch the appropriate "interpreter"
>(cmd.exe for .cmd, sh.exe for test-cgi).
>
>Unix-based systems interpret the first line of scripts (the #! line) and
>invoke the interpreter for you. On OS/2 Apache does this for you; it reads
>the first line and launches /bin/sh. Of course, this only works if there is
>a /bin/sh (/bin/sh.exe may or may not be enough).
>
>This is what Apache 1.3.x on OS/2 does to execute a script::
>
>read some of the file into a buffer
>if( begins with "#!" )
>{
>  it's a script
>  if not( "#!/" or "#!\\" or "#!_:" )
>  {
>   /* doesn't look like an absolute path */
>   search the path for the interpreter
>  }
>}
>
>if( it's a script )
>{
>  launch the interpreter with the CGI name as a parameter
>}
>else if( ends with .CMD )
>{
>  launch: CMD.EXE /C "CGI name"
>}
>
>Therefore, because test-cgi begins with "#!/bin/sh", Apache tries to run
>?:\bin\sh (where ? is probably the drive letter of the Apache installation).
>Try changing "#!/bin/sh" to "#!sh.exe" if you have sh.exe in the path.

http://silk.apana.org.au/pipermail/apache2/


No.1-11 No.12-31 No.32 No.33-34 / Last 20
YNARI BBS version 1.9.4.2 (C)2001-2014 Achain