Gnokii working in Linux command line but not in PHP system command
Gnokii working in Linu开发者_如何学运维x command line in RHEL5 but not through PHP system command. What to check?
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.
精彩评论