<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>php and oci8 issues</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="en-us">Hi,<BR>
  I am compiling php 5.2.5 with OCI8 on centOS 5. I have installed the following from oracle<BR>
<BR>
oracle-instantclient-basic-10.2.0.3-1<BR>
oracle-instantclient-sqlplus-10.2.0.3-1<BR>
oracle-instantclient-devel-10.2.0.3-1<BR>
<BR>
These were the compile used while configure php<BR>
<BR>
'./configure' '--prefix=/usr/local/php-5.2.5' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/usr/local/php-5.2.5/etc' '--with-config-file-scan-dir=/usr/local/php-5.2.5/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--with-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-snmp=shared,/usr' '--with-unixODBC=shared,/usr' '--enable-shmop' '--enable-calendar' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-dom=shared' '--with-pgsql=shared'  '--disable-dba' '--disable-xmlreader' '--disable-xmlwriter' '--without-gdbm' '--with-gd=shared' '--with-imap=shared' '--with-imap-ssl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config' '--enable-mbstring=shared' '--enable-mbregex'  '--with-libmbfl' '--with-pdo-mysql=shared,/usr/bin/mysql_config' '--enable-pdo=shared'  '--with-pdo-odbc=shared,unixODBC,/usr'  '--with-xmlrpc=shared' '--with-ncurses=shared' '--with-ldap=shared'  '--with-pdo-pgsql=shared,/usr' '--without-pdo-sqlite' '--with-db4=/usr' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--enable-fastcgi'  '--enable-cgi' '--with-apxs2=/usr/sbin/apxs' '--with-oci8=shared,instantclient,/usr/lib/oracle/10.2.0.3/client/lib' '--enable-sigchild'<BR>
<BR>
Compile and install was successful. Apache was not working and these are the sealert messages, i am putting here only summary, raw audit message and suggestions, which i followed in the same order below to make Apache work<BR>
<BR>
<BR>
1. Summary<BR>
    SELinux is preventing /usr/local/php-5.2.5/bin/php from loading<BR>
    /usr/lib/oracle/10.2.0.3/client/lib/libnnz10.so which requires text<BR>
    relocation.<BR>
   <BR>
    Raw Audit Messages            <BR>
<BR>
avc: denied { execmod } for comm="php" dev=dm-0 egid=0 euid=0<BR>
exe="/usr/local/php-5.2.5/bin/php" exit=-13 fsgid=0 fsuid=0 gid=0 items=0<BR>
path="/usr/lib/oracle/10.2.0.3/client/lib/libnnz10.so" pid=27356<BR>
scontext=root:system_r:unconfined_t:s0-s0:c0.c1023 sgid=0<BR>
subj=root:system_r:unconfined_t:s0-s0:c0.c1023 suid=0 tclass=file<BR>
tcontext=system_u:object_r:lib_t:s0 tty=pts1 uid=0<BR>
<BR>
    chcon -t textrel_shlib_t /usr/lib/oracle/10.2.0.3/client/lib/*.so<BR>
<BR>
<BR>
2.  SELinux is preventing /usr/sbin/httpd (httpd_t) "execstack" access to<BR>
    <Unknown> (httpd_t).<BR>
    Raw Audit Messages            <BR>
<BR>
avc: denied { execstack } for comm="httpd" egid=0 euid=0 exe="/usr/sbin/httpd"<BR>
exit=-13 fsgid=0 fsuid=0 gid=0 items=0 pid=27907<BR>
scontext=root:system_r:httpd_t:s0 sgid=0 subj=root:system_r:httpd_t:s0 suid=0<BR>
tclass=process tcontext=root:system_r:httpd_t:s0 tty=(none) uid=0<BR>
<BR>
     setsebool -P httpd_disable_trans=1<BR>
<BR>
3. Summary<BR>
    SELinux is preventing /usr/sbin/httpd from changing the access protection of<BR>
    memory on the heap.<BR>
    Raw Audit Messages            <BR>
<BR>
avc: denied { execheap } for comm="httpd" egid=0 euid=0 exe="/usr/sbin/httpd"<BR>
exit=0 fsgid=0 fsuid=0 gid=0 items=0 pid=3913 scontext=root:system_r:initrc_t:s0<BR>
sgid=0 subj=root:system_r:initrc_t:s0 suid=0 tclass=process<BR>
tcontext=root:system_r:initrc_t:s0 tty=(none) uid=0<BR>
<BR>
     setsebool -P allow_execheap=1<BR>
<BR>
<BR>
<BR>
Has anybody compiled PHP 5 with Oracle client on Redhat or Centos 5 with out any selinux issues? Is this the known issue or my procedures are wrong. I have tried compiling couple of weeks back with Red Hat ent5 php source rpms and got the same selinux errors. Any possible help to put back allow_execheap=0  httpd_disable_trans=0.<BR>
<BR>
Thanks.</SPAN><SPAN LANG="en-us"></SPAN></P>

</BODY>
</HTML>