note 110226 added to oci8.installation
| From: | Sergey | Date: | Wed, 03 Oct 2012 08:31:53 +0000 |
| Subject: | note 110226 added to oci8.installation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191109@lists.php.net to get a copy of this message | ||
Lost a day on trying to make work oci8 & pdo_oci extensions in php-fpm 5.3 on OpenSuSE 12.2
(64bit) with latest oracle instant client 11.2.0.3.0.
Any of two works normally with generic instructions. But both extensions caused crash in
oci_connect().
Solution was simple add ORACLE_HOME variable BEFORE running php-fpm.
/etc/profile.d/oracle.sh
#!/bin/bash
ORACLE_HOME=/usr/lib/oracle/11.2/client64
LD_LIBRARY_PATH=$ORACLE_HOME/lib
NLS_LANG=american_america.utf8
export ORACLE_HOME LD_LIBRARY_PATH NLS_LANG
/etc/init.d/php-fpm
.....
. /etc/rc.status
. /etc/profile.d/oracle.sh # add this after rc.status (note: dot & space)
.....
After "service php-fpm restart" works normally. Hope this helps.
----
Server IP: 69.147.83.199
Probable Submitter: 62.141.102.248
----
Manual Page -- http://www.php.net/manual/en/oci8.installation.php
Edit -- https://master.php.net/note/edit/110226
Del: integrated -- https://master.php.net/note/delete/110226/integrated
Del: useless -- https://master.php.net/note/delete/110226/useless
Del: bad code -- https://master.php.net/note/delete/110226/bad+code
Del: spam -- https://master.php.net/note/delete/110226/spam
Del: non-english -- https://master.php.net/note/delete/110226/non-english
Del: in docs -- https://master.php.net/note/delete/110226/in+docs
Del: other reasons-- https://master.php.net/note/delete/110226
Reject -- https://master.php.net/note/reject/110226
Search -- https://master.php.net/manage/user-notes.php