Your perl script sometimes work from the command line but shows “Internal Server Error” on accessing the script via the browser. The Apache error logs shows the error message as
"Can't do setuid (cannot exec sperl)".
The the reason for the setuid error on theĀ perl script is the script have the setuid bit set and won’t work from the browser since they are running under the user apache. To make such perl scripts work, you need to install the perl-suidperl package.
To install the package, just execute the command
# yum install perl-suidperl
Comments are closed.