thanks,
but i tried the command you gave me, and also tried changing the shell script's permission through fedora's interface, but both don't seem to work even though it's been set to apache.
actually..i'm not too sure, how will i know what my apache is running as? when i checked on the root of apache's folder, it says it belongs to root. I tried changing all to root but it still doesn't seem to work.
for simplicity sake i'm just testing whether it can call the shell script without accessing other folders :
test.sh :
#!/bin/bash
echo Hello World
when i ran 'sh /path/test.sh' from terminal, it will return me "Hello World". But if i ran it with exec("sh /path/test.sh", $output) or $output = shell_exec("sh /path/test.sh"), both $output won't have anything....that means..somehow, it can't access it yet.
if apache's folder permission is 'root', does that mean apache is running as root? or is there any other places that i need to check to make php run scripts?
edit :
i just checked my error logs on apache, it says permission denied etc :
"sh: /path/test.sh : permission denied"
hi again..I just checked a few more things and found out that..
1.my apache's home directory is at /var/www
2. but apache was installed on /usr/local/apache2
3. my project resides on /usr/local/apache2/htdocs/myproject
when i put my test.sh into /var/www/ and chmod 777 to it, I'm able to execute the script from within php.
does this mean that in order for me to access shell scripts from php, I MUST run the script from apache's home?
another discovery!
after granting test.sh as apache user, and i did chmod 777 again..but this time chmod to the full path /usr/local/apache2/htdocts/myproject/tools/test.sh i can get php to run it from /usr/local folder! funny...previously i tried granting access base on relative path but it won't work.
but my final problem...is how am i able to give access to 'apache' to run soffice?
if i call my test.sh from exec of php, and that my test.sh contains a call that needs to interact with open office (any application will do), i'll get access problem again.
open office folder :
/usr/lib/openoffice.org2.0/program/soffice
the problem is, soffice is currently assigned to root, and i can't possible change it to 'apache' because someone else need to use it. How do i let apache use it? I can't find any interface in fedora that allows me to say..this file can be run by the following users..?
edit :
I installed open office 3, and been getting this error :
[Java framework] Error in function createSettingsDocument (elements.cxx).javaldx failed!