LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Apache passing arguments to a shell script disabled? (https://www.linuxquestions.org/questions/linux-security-4/apache-passing-arguments-to-a-shell-script-disabled-211715/)

mikeyt_333 07-30-2004 11:22 PM

Apache passing arguments to a shell script disabled?
 
K, I am dealing with a baffling problem. I have two php scripts, both of which call the htdig htsearch binary, and post the results to stdout or the web. The only difference between the two scripts is the fact that one is written to run on the command line, the function, and the information passed to the htsearch program is EXACTLY the same. Now, when I run the script from the command line I get a long list of results, but when I run the web version I not only get zero results but it acts as though no search string was passed to the htsearch script. Here are the two scripts:

Web based script:
PHP Code:

<?
$Results 
shell_exec("/home/[USER]/usr/bin/htsearch words=Headache");

echo 
$Results;
?>

CLI based script:
PHP Code:

#!/usr/bin/php -q
<?
$Results 
shell_exec("/home/[USER]/usr/bin/htsearch words=Headache");

echo 
$Results;
?>

I have posted on the Devshed forums, and they are as baffled as I am. The only explenation I can think of is a security feature disabling apache from being able to send arguments to a system program. Any ideas? I have even tried writing a shell script which calls the htsearch binary directly with the search terms:

Code:

#!/bin/bash
/home/[USER]/usr/bin/htsearch.bin -vv words=$1
exit 0;

And once again, from the command line the php script which then calls this script returns results, but over the web the php script calling this script returns no results and acts like no search term was provided. I'd appreciate any help you can provide! One last note, I have checked all permissions, every single file needed is accessible via the web, I can read and print the contents of all of them, and I can even do a ls -l [DIR] perfectly fine.

TIA!
Mike.

mikeyt_333 07-30-2004 11:48 PM

K, I just figured out that I can't print the results of a gpg encryption to the web either. This is seeming more and more like a security feature.

mikeyt_333 08-02-2004 04:40 PM

Does anybody have any idea, I am currently unable to perform any of my duties at work until I pass this situation, I understand that it's nobodies problem, but help would be greatly appreciated. Thanks!

Mike.

mikeyt_333 08-03-2004 06:09 PM

Is there nobody out there with any idea? Please somebody post something.


All times are GMT -5. The time now is 03:30 AM.