Last active
December 19, 2015 01:58
-
-
Save g-alonso/5879353 to your computer and use it in GitHub Desktop.
compile.php5.3.27.with-oci.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 - Download Instant Client | |
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html?ssSourceSiteId=ocomen | |
2 -Alienize! | |
3 - Create tnsnames.ora in /usr/lib/oracle/11.2/client64/network/admin/ | |
4 - Create oracle.sh in /etc/profile.d with the envars | |
5 - Add . /etc/profile.d/oracle.sh in apache envvars | |
./configure \ | |
--prefix=/usr/local/php/php_5.3.27 \ | |
--enable-bcmath \ | |
--enable-calendar \ | |
--enable-exif \ | |
--enable-ftp \ | |
--enable-gd-native-ttf \ | |
--enable-libxml \ | |
--enable-magic-quotes \ | |
--enable-mbstring \ | |
--enable-pdo \ | |
--enable-sockets \ | |
--enable-zip \ | |
--enable-soap \ | |
--with-apxs2=/usr/local/apache2/bin/apxs \ | |
--with-curl \ | |
--with-curlwrappers \ | |
--with-gd \ | |
--with-gettext \ | |
--with-mcrypt \ | |
--with-mysql=/usr/local/mysql \ | |
--with-mysqli=/usr/local/mysql/bin/mysql_config \ | |
--with-openssl \ | |
--with-oci8=/usr/lib/oracle/11.2/client64 \ | |
--with-pdo-oci=/usr/lib/oracle/11.2/client64 \ \ | |
--with-pdo-mysql=mysqlnd \ | |
--with-pdo-sqlite \ | |
--with-pic \ | |
--with-sqlite \ | |
--with-tidy \ | |
--with-xmlrpc \ | |
--with-xsl \ | |
--with-zlib | |
If Error: PHP fatal error: oci.h: No such file or directory | |
ORACLE SDK fix | |
Some packages may look for 'oci.h' in $ORACLE_HOME/include, or in $ORACLE_HOME/rdbms/public | |
The instant client sometimes places the include files, such as oci.h, in /usr/include/oracle/<version>/client. | |
Inspect your system by running the following commands | |
ls $ORACLE_HOME | |
ls -d /usr/include/oracle/*/client | |
If there is no 'include' directory under ORACLE_HOME, and it is located over in /usr/include/oracle/ , create a symbolic link to assist packages looking for these header files. For example, | |
sudo ln -s /usr/include/oracle/11.2/client $ORACLE_HOME/include | |
And then check it is correct | |
ls $ORACLE_HOME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment