PRoblem with PDO INFORMIX and SELINUX
Posted in 2012
Hello everybody, I installed PDO INFORMIX version 1.2.7 and Informix Dynamic Server version 11.50 FC9. We use FEDORA version 17. The installation worked correctly. I added INFORMIXDIR variable in the /etc/sysconfig/httpd file. When I restart Apache (with the command service httpd restart), INFORMIXDIR is well known in Apache (I tested phpinfo(), it's good). PDO INFORMIX is well enabled with Apache version 2.2.15, but, I must disable SELINUX program on the server so that the PHP connection works ! Indeed, I met the following problem when SELINUX is enabled : - If SELINUX is enabled, then, PDO INFORMIX is not loaded because I have the following message in the error log of Apache : PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_informix.so' - libifcli.so: failed to map segment from shared object: Permission denied in Unknown on line 0 After some research on the Web, I run this command in the directory $INFORMIXDIR/lib and its subdirectories : chcon -t lib_t *.so WHen I restart Apache, the error message has disapeared and PDO INFORMIX is well loaded. - But when I tested the connectivity verification with Informix PDO (with the example 5-19 page 218 of the redbook Developing PHP Applications for IBM Data Servers http://www.redbooks.ibm.com/redbooks/pdfs/sg247218.pdf), I have the error -908 !!! - If I disable the SELINUX program, then the same program works without the error -908. Moreover, I constated when I enable again SELINUX, when I reboot the server, I have the following messages "WARNING - SELINUX targeted policy relabekl is required "conflicting specifications for /opt/infx1150/etc/ibmifmx_security.sh" How to solve this conflict when SELINUX is enabled ? How to solve my problem connection with PDO Informix when SELINUX is enabled ? Regards, -- Franck Thomas ConsultiX franck.thomas@consult-ix.fr Téléphone : 33 (0) 1 39 12 18 00 Mobile : 33 (0) 6 78 81 09 33 Fax : 33 (0) 1 39 12 18 18