Difference between revisions of "Php"

From KeegansWiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
=Pecl=
 +
=oci8=
 +
==Src==
 +
<pre>
 +
[root@dstolloadvm02 ~]# cd /usr/local/src/oci8-1.4.7
 +
[root@dstolloadvm02 oci8-1.4.7]# cat config.nice
 +
#! /bin/sh
 +
#
 +
# Created by configure
 +
 +
'./configure' \
 +
'--with-oci8=shared,/oracle/11g/11.7' \
 +
"$@"
 +
[root@dstolloadvm02 oci8-1.4.7]#
 +
</pre>
 +
==Pecl==
 +
pecl install oci8
 +
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client  [autodetect] : /oracle/11g/11.7/
 +
==Errors==
 +
PHP Warning:  oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories in php shell code on line 1
 +
<pre>
 +
#cat /etc/ld.so.conf.d/oracle-11g.conf
 +
/oracle/11g/11.7/instantclient
 +
export ORACLE_HOME=/oracle/11g/11.7/
 +
</pre>
 
=CLI=
 
=CLI=
 
==Running code from command line==
 
==Running code from command line==

Revision as of 06:38, 16 March 2012

Pecl

oci8

Src

[root@dstolloadvm02 ~]# cd /usr/local/src/oci8-1.4.7
[root@dstolloadvm02 oci8-1.4.7]# cat config.nice 
#! /bin/sh
#
# Created by configure

'./configure' \
'--with-oci8=shared,/oracle/11g/11.7' \
"$@"
[root@dstolloadvm02 oci8-1.4.7]# 

Pecl

pecl install oci8
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client  [autodetect] : /oracle/11g/11.7/ 

Errors

PHP Warning:  oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories in php shell code on line 1
#cat /etc/ld.so.conf.d/oracle-11g.conf 
/oracle/11g/11.7/instantclient
export ORACLE_HOME=/oracle/11g/11.7/

CLI

Running code from command line

php -r "echo date('Y-m-d H:i:s');";
2011-04-20 11:49:55

Compiling Issues

ltdl

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

yum install libtool-ltdl libtool-ltdl-devel