Php

From KeegansWiki
Revision as of 07:38, 16 March 2012 by Keegan (talk | contribs)
Jump to navigation Jump to search

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