views:

100

answers:

2

gnokii working in linux command line in rhel5 but not through php system command, what to check? pls help.

A: 

What is most likely happening is that SELinux is (correctly) preventing httpd from executing gnokii. httpd runs as httpd_t, gnokii is labelled as bin_t, and there's no domain transition from one to the next. Solutions include disabling SELinux completely (not recommended), allowing httpd_t to freely execute bin_t (also not recommended), and giving gnokii a new file context and creating a domain transition rule for it.

Running man httpd_selinux gives a bit more information, but in order to create a new transition rule you'll need to see the various resources linked to on the SELinux website.

Ignacio Vazquez-Abrams
A: 

Even after disabling SELinux, its not working.

then by analysing /var/log/httpd/error_log file, we found that its not initialising properly, its reading .gnokiirc file from "//.gnokiirc" instead of "/home/my_user_name/.gnokiirc" which is not available.then it is loading the configuration available in /etc/gnokiirc file, which is not modified for our requirement. So, we modified it, now its working.....

thank you for your reply.

Kumar