linux – php – oracle OCI

Oli tarvis php-le OCI tuge. 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

ln -s

Siis tirisin (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)


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/'See any operating system documentation about shared libraries for
more information, such as the ld(1) and manual pages.
Installing shared extensions: /usr/lib/php/modules/

Lisame php.ini-s rea:

apachele restart

[14:48:37 root@arendus ~]# php -i | grep oci
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100 => 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