TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: LEW PITCHER
date: 2018-01-30 14:16:00
subject: Re: How to enable cgi scr

Bengt Törnqvist wrote:

> With an earlier Raspian version I have succeeded in execution of cgi
> scripts. Now it seems to me that the process to enable cgi execution has
> been modified.
>
>
> My test script, presently "open" for all users "-rwxrwxrwx 1 root
> root...", in the /usr/lib/cgi-bin/ folder is:
>
> #!/bin/bash
> echo -e "Content-type: text/html\n\n"
> echo ""
>
> echo "This is start of test.cgi"
>
> echo "#!/bin/bash" >test1.script
> echo "echo \"This is test1.script\"" >>test1.script

So far, you've created a file called "test1.script" in the current working
directory

> chmod 755 test1.script

And now you've made that file executable.

> /usr/lib/cgi-bin/test1.script

And now, you try to execute a script with the full path name of
  /usr/lib/cgi-bin/test1.script

Are you certain that this is the /same/ file as you created above? In other
words, are you sure that the current working directory is /usr/lib/cgi-bin ?
It probably isn't.

> echo "This is end of test.cgi"
> echo ""
>
>
> The result in a browser screen becomes:
>
> This is start of test.cgi
> This is end of test.cgi
>
>
> The /var/log/apache2/error.log shows:
>
> .../usr/lib/cgi-bin/test.cgi: line 10: /usr/lib/cgi-bin/test1.script: No
> such file or directory: /usr/lib/cgi-bin/test.cgi, referer...

Is this verbatum from your error.log?

> Obviously some configuration to allow the cgi script to execute and write
> is missing. I can however not find out where and how.
>
> I kindly ask for assistance and advises.


--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.