Can please anyone help me. i have the following script:
#!/bin/bash
cache_query=$QUERY_STRING
xxx=`echo $cache_query | grep -o 'x=[0-9]*' | sed 's/x=//g'`;
yyy=`echo $cache_query | grep -o 'y=[0-9]*' | sed 's/y=//g'`;
zzz=`echo $cache_query | grep -o 'z=[0-9]*' | sed 's/z=//g'`;
let "zzz=18-$zzz"
content_type=`echo $cache_query | grep -o 'type_image=[a-z]*' | sed 's/type_image=//g'`;
db_name=`echo $cache_query | grep -o 'db=[a-z]*' | sed 's/db=//g'`;
echo "Content-type: image/"${content_type}
echo ""
case "$db_name" in
"genshtab" ) db_path="/home/bases/gena.sqlite";;
"yasat" ) db_path="/srv/ftp/upload/yasat.sqlitedb";;
esac
echo "x = " $xxx "y = " $yyy "z = " $zzz "type = " $content_type "database = " $db_name "db_path = " $db_path; #оставляю на всякий $
./tget ${db_path} ${db_name} "/mnt/tmpfs" ${content_type} ${zzz} ${yyy} ${xxx}
cat /mnt/tmpfs/${db_name}/${zzz}/${yyy}/${xxx}.${content_type}
i wrote tget program on c, so if i write
./tget /srv/ftp/upload/yasat.sqlitedb yasat /mnt/tmpfs png 17 0 1
in bash line everything go great, but if i try to call this program from bash script under apache http://46.182.21.31/?type_image=png&db=yasat&x=2&y=1&z=15 the program doesn't start and no errors in my log, is somebody have any ideas why?