LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   perl: (2)No such file or directory: exec of ... (https://www.linuxquestions.org/questions/linux-newbie-8/perl-2-no-such-file-or-directory-exec-of-599269/)

xpucto 11-13-2007 04:55 AM

perl: (2)No such file or directory: exec of ...
 
Hi!

I have installed a programm written in perl called socialcalc. The programm works locally when I do
Code:

perl bin/socialcalc.pl
but I don't get anything when I try to reach it from internet. The page is just blank with no reaction.
The webserver is a FC6 with apache2. I don't get any security message, only some error message in error_log:
Quote:

[Tue Nov 13 11:39:48 2007] [error] [client 111.111.111.111] (2)No such file or directory: exec of '/var/www/cgi-bin/myProgramm/bin/socialcalccgi.pl' failed
[Tue Nov 13 11:39:48 2007] [error] [client 111.111.111.111] Premature end of script headers: socialcalccgi.pl
It can't file eventhough the file is definitly here. On the webpage I don't get any 404 Not Found error message anyway.
I also disabled SELinux, but it didn't make any difference.
I also have to say that I have a very similar programm (wikicalc, also in perl) running on the same webserver, and I have no problem.
I also installed the programm on another server, and got the same result with the same error message.

So what could be the problem?
thanks.

xpucto 11-13-2007 05:21 AM

Ok, I got it to work!
The perl scipt begann like this
Code:

#!/usr/bin/perl
I changed the first line into this
Code:

#!/usr/bin/perl -w
and with this little "-w" it now works! I don't understand why though. In the manpages it say that -w is for warnings.
Does anyone understand any of this?


All times are GMT -5. The time now is 04:45 AM.