in reply to Re^3: perlbrew configuration and CGI Script
in thread perlbrew configuration and CGI Script

Thank you huck for your reply

I did some researches after your reply. I did not knew how to look into apache user group. So here it comes:

First: the apache process on mac is called httpd. I changed your command to:

$ ps -ef | grep -i httpd 0 845 1 0 10:00AM ?? 0:00.14 /usr/sbin/httpd -D FO +REGROUND 70 857 845 0 10:00AM ?? 0:00.01 /usr/sbin/httpd -D FO +REGROUND 501 865 434 0 10:02AM ttys000 0:00.00 grep -i httpd

I changed the permissions of all folders and module I wrote for the script from mstep:staff to root:wheel (folders in /usr/libexec/apache2/lib/perl/WebDB)., which is quite cumbersome on MacOS Sierra, because you have to disable the SIP issuing csrutil disable in recovery mode. But still the same problem:

#!/usr/bin/perl -> working #!/usr/local/bin/perl -> NOT working ls -l /usr/local/bin/perl lrwxr-xr-x 1 mstep admin 55 Feb 24 07:12 /usr/local/bin/perl@ -> /U +sers/mstep/perl5/perlbrew/perls/perl-5.25.10/bin/perl

I think I will give up to use perlbrew and switch back to the system Perl. The error_log of apache says with the Shebang of perlbrew

[Sun Mar 05 10:00:35.350898 2017] [cgi:error] [pid 857] [client ::1:49 +249] AH01215: BEGIN failed--compilation aborted at /Library/WebServer +/CGI-Executables/todo04.pl line 28.: /Library/WebServer/CGI-Executabl +es/todo04.pl [Sun Mar 05 10:00:35.350982 2017] [cgi:error] [pid 857] [client ::1:49 +249] End of script output before headers: todo04.pl

Replies are listed 'Best First'.
Re^5: perlbrew configuration and CGI Script
by huck (Prior) on Mar 05, 2017 at 10:40 UTC