External programs ---Grrrrrrrrrrr

A

Anonymous

Guest
Hi all!
I have just installed my first Linux distribution (SUSE 10.0).
Everything is compiled as far as Apache, Mysql & PHP is concerned.
But, I have this problem: I call system commands through PHP using system, shell_exec etc
The thing is that PHP responds OK when it comes to 'ls' or 'grep' or 'wget', but, in another program,
not UNIX-native, there is no response.
I am sure that the program is set up in the PATH, because, if I open a terminal, I can call it from everywhere and it works fine!
Any ideas on why PHP can't call it like 'ls' for example?

**One thing that really angries me is that in the University, these things work fine, and the external program is called without any problem. **
 
what kind of external program do you call ?
if you are unsure of the path why don't you call giving the full path like "/usr/local/bin/yourprog"
 
Hi, thanx for your answer.
the program I want to call is a biological one (I am studying biology), that can be installed and ran locally on a UNIX machine.
I have installed it as root user and I have checked that it can also be ran in my home directory, without having to call it from the full path.
However, I tried calling it like /usr/local/bin/hmmpfam (hmmpfam is the name of the program), but again no luck.
What I can only think about has to do with Apache. I mean that, the documents I use are stored in /srv/www/htdocs.
I think that when you ran something in your webserver, this is executed as wwwrun user, right?
do you think I must somehow grant privileges to this user specifically ?
(I just want to note that the html or other files in the htdocs/ directory are functioning correctly. Only that problem with the external program is not executed...)
 
hi just issue this command
just put the following command at the top of your php script

Code:
error_reporting(E_ALL & ~E_NOTICE);
you'll get a decent err message.

and ....
Code:
chmod x+ /usr/local/bin/hmmpfam

this should make the prog. executable by any user, then try re-running your script
 
Back
Top