LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shell script not running (https://www.linuxquestions.org/questions/linux-newbie-8/shell-script-not-running-918471/)

sunlinux 12-13-2011 04:59 AM

shell script not running
 
I am calling a shell script from cgi on local machine itself

in cgi:
my $st="my.sh one two"; (one two parameters)
system ($st);

above not working in 2.6.18-194.el5 and there is no error in logs as well. but same is working on Solaris in one go .

i am using below path in shell script
#!/bin/bash
I also tried /bin/sh

maradnus 12-13-2011 05:04 AM

Chmod 755 file
 
Check the file permission. That is set execute permission for the file...

zQUEz 12-13-2011 06:04 AM

will "my.sh" be in the path? You didn't specify the full path to that file, how will it know where to find it?
I would start with putting some logging at each step of your cgi script to see where it gets to and take it from there.
Once you know which line is failing, then you know what to focus on.
Don't assume Solaris has the exact same syntax as Linux. Also don't assume the environments work exactly the same.


All times are GMT -5. The time now is 02:40 PM.