LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 07-30-2004, 11:22 PM   #1
mikeyt_333
Member
 
Registered: Jun 2001
Location: Up in the clouds
Distribution: Fedora et al.
Posts: 353

Rep: Reputation: 30
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.

Last edited by mikeyt_333; 07-30-2004 at 11:24 PM.
 
Old 07-30-2004, 11:48 PM   #2
mikeyt_333
Member
 
Registered: Jun 2001
Location: Up in the clouds
Distribution: Fedora et al.
Posts: 353

Original Poster
Rep: Reputation: 30
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.
 
Old 08-02-2004, 04:40 PM   #3
mikeyt_333
Member
 
Registered: Jun 2001
Location: Up in the clouds
Distribution: Fedora et al.
Posts: 353

Original Poster
Rep: Reputation: 30
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.
 
Old 08-03-2004, 06:09 PM   #4
mikeyt_333
Member
 
Registered: Jun 2001
Location: Up in the clouds
Distribution: Fedora et al.
Posts: 353

Original Poster
Rep: Reputation: 30
Is there nobody out there with any idea? Please somebody post something.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameters to a shell script neocookie Linux - General 5 10-20-2005 11:44 AM
Passing arguments to a shell script subu_s Programming 3 09-02-2005 05:13 AM
help changing case on arguments to bourne shell script Maldain Programming 2 05-03-2005 10:18 AM
Passing variables from AWK script to my shell script BigLarry Programming 1 06-12-2004 04:32 AM
Issue with recursive script passing arguments gauge73 Linux - Newbie 0 01-06-2004 07:16 PM


All times are GMT -5. The time now is 04:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration