linux – php – oracle OCI

Oli tarvis php-le OCI tuge.

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html lehelt on vaja kaks pakki.

oracle-instantclient11.2-basic ning oracle-instantclient11.2-devel. Mina võtsin RPM-id mis istusid kenasti FC-10 peale.

library-d sattusid siia: /usr/lib/oracle/[VERSION]/client/lib/

siin ma tegin general symlingid:

ln -s libclntsh.so.11.1 libclntsh.so

ln -s libocci.so.11.1 libocci.so

Siis tirisin http://pecl.php.net/get/oci8-1.4.1.tgz (ilmselt tulevikus versioon muutub)

Pakkisin lahti ning läksin lahtipakitud kataloogi

./configure –with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client/lib/  (11.2 on siis versioon minujuures. Tulevikus võib muutuda)

make

sudo make install


Libraries have been installed in:
/home/margusja/oci8-1.4.1/modulesIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions: /usr/lib/php/modules/
>

Lisame php.ini-s rea: extension=oci8.so

apachele restart


[14:48:37 root@arendus ~]# php -i | grep oci
oci8
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20

Leave a Reply