How to setup D language with Apache httpd cgi?
BoQsc
vaidas.boqsc at gmail.com
Wed Jul 31 08:32:43 UTC 2019
On Wednesday, 31 July 2019 at 07:57:01 UTC, BoQsc wrote:
>>[Wed Jul 31 10:44:26.887024 2019] [cgid:error] [pid 846:tid
>>140090256426752] [client >127.0.0.1:57052] malformed header
>>from script 'example.d': Bad header: Fetching arsd-official
>>4.0.1 (
>>/usr/lib/cgi-bin/.dub/packages/: Permission denied
Added sudo to the shebang, it started to say that sudo requires
tty, meaning that there is no graphical interface for user to
input the password.
>[Wed Jul 31 11:14:53.183607 2019] [cgid:error] [pid 6207:tid
>140374439274240] [client >127.0.0.1:57400] End of script output
>before headers: example.d
>sudo: no tty present and no askpass program specified
Script:
>#!/usr/bin/env -S sudo dub run --single
>/+ dub.sdl:
> name "hello"
> dependency "arsd-official" version="~>4.0.1"
>
>+/
>import std.stdio;
>void main()
>{
> writeln(`Content-type: text/html`);
> writeln(``);
> writeln(`<body style="background: lightgreen">CGI D
> Example</body>`);
>
>}
More information about the Digitalmars-d-learn
mailing list