hi all,
I am running a apache webserver on a solaris box. I am writing a cgi-script in perl. The problem is that i want my script to return the number of httpd processes the server is running. I am trying
$daemons = system("ps -ef | grep httpd | wc"
print $daemons;
However, this dosen't work. I get this error in the error logs
malformed header from script. Bad header = 40 357 3608 (which is the result of the call)
I have tried doing this will other system calls such as df -k but it dosent work. However, this works as a .pl program but not in a cgi script. Any ideas? Thanks for your time.
jim
I am running a apache webserver on a solaris box. I am writing a cgi-script in perl. The problem is that i want my script to return the number of httpd processes the server is running. I am trying
$daemons = system("ps -ef | grep httpd | wc"
print $daemons;
However, this dosen't work. I get this error in the error logs
malformed header from script. Bad header = 40 357 3608 (which is the result of the call)
I have tried doing this will other system calls such as df -k but it dosent work. However, this works as a .pl program but not in a cgi script. Any ideas? Thanks for your time.
jim