OCI8 1.2.1

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
The latest version of OCI8 1.2.1 doesn't work with LOB fields. There was
an open bug, but Tony2001 was his usual helpful self, so he removed the
bug and flatly denied its existence. I had to download 1.2.0 and reading  
CLOB fields started working again. Unfortunately, DBMS_METADATA.GET_DDL  
returns CLOB, so I was forced to discover this non-existing bug. PECL  
bug system is useless and maintainers are more suited for inquisitors then  
for programmers. Did anybody else have a problem? If anybody was able to
resolve this problem, I'd like to know the solution?  
The bug that was open and then denied was open for PHP 4.4 and I
experienced it with PHP-5.1.4. The native OCI8 that comes with PHP-5.1.4
also has the same problem. Please, let me know if anybody else has
experienced the problem and how.


Re: OCI8 1.2.1

On Sat, 20 May 2006 23:49:22 +0000, Mladen Gogala wrote:

Quoted text here. Click to load it

There is a patch published for this problem. This was quick.  


Re: OCI8 1.2.1

Quoted text here. Click to load it

It was a variable size issue.  Pointers to 4 byte numbers were being
passed to an Oracle routine expecting 8 bytes.  This caused random
behavior so it is no wonder Antony couldn't reproduce it.

Oracle's LOB development team spotted the code error.


Christopher Jones, Oracle Corporation, Australia.
Email: Christopher.Jones@oracle.com
Blog:  http://blogs.oracle.com/opal/

Re: OCI8 1.2.1

Can some one tell me how can I install a new version of oci8 when I
already have php and oci8 installed.

I also wanted to how to find which oci version do I have.


sims123's Profile: http://techiegroups.com/member.php?userid=353
View this thread: http://www.techiegroups.com/showthread.php?t=109268

Re: OCI8 1.2.1

On Tue, 19 Sep 2006 01:15:07 -0400, sims123

Quoted text here. Click to load it

 Recompile PHP without oci8 support (either omit --with-oci8 or explicitly use
--without-oci8), then download the new OCI8 version from pecl.php.net, and
follow the build instructions.

 Copy the module to the appropriate place, and load it in php.ini.

 No doubt there's also a way to statically link a PECL library into the PHP
module itself - I haven't done that before, I'd expect it's in the docs.

Quoted text here. Click to load it

 Bit of a pain, it's not shown directly in phpinfo(), only the CVS revision
number of one of the files. Looks like it's oci8.c:


 ... but that doesn't seem to tie up in any way with the PECL module release

Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Re: OCI8 1.2.1

On Tue, 19 Sep 2006 01:15:07 -0400, sims123 wrote:

Quoted text here. Click to load it

You should do the following:

1) Download & unpack the software
2) Go to the directory where you unpacked the software and run
   the following, in that order:
As "root":
   make install

After that, you will have to update your php.ini. If you created it from
the php.ini-dist there are comments how to do that. Typically, parameters  
you need to adjust would look like this:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20050922"

Also, for OCI8 you must not have OCI8 already linked into the PHP module.
There is also a standard recommendation to have the following option
enabled when linking PHP:  --enable-sigchild  

Here is almost complete example:
$ tar zxvf oci8-1.2.2.tgz
$ cd oci8-1.2.2
$ phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
$ ./configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
configure: creating ./config.status
config.status: creating config.h

$ make
/bin/sh /tmp/oci8-1.2.2/libtool --mode=compile gcc  -I. -I/tmp/oci8-1.2.2 -DPHP_ATOM_INC -I/tmp/oci8-1.2.2/include -I/tmp/oci8-1.2.2/main -I/tmp/oci8-1.2.2 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/oracle/product/10g/rdbms/public -I/oracle/product/10g/rdbms/demo -I/oracle/product/10g/plsql/public  -DHAVE_CONFIG_H  -g -O2   -c /tmp/oci8-1.2.2/oci8.c -o oci8.lo
mkdir .libs
 gcc -I. -I/tmp/oci8-1.2.2 -DPHP_ATOM_INC -I/tmp/oci8-1.2.2/include -I/tmp/oci8-1.2.2/main -I/tmp/oci8-1.2.2 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/oracle/product/10g/rdbms/public -I/oracle/product/10g/rdbms/demo -I/oracle/product/10g/plsql/public -DHAVE_CONFIG_H -g -O2 -c /tmp/oci8-1.2.2/oci8.c  -fPIC -DPIC -o .libs/oci8.o
Libraries have been installed in:

If 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.

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

After that, you do make install like this:
$ su - root
[root@medo ~]# service httpd stop
Stopping httpd:                                            [  OK  ]
[root@medo ~]# cd /tmp/oci8-1.2.2
[root@medo oci8-1.2.2]# make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20050922/
[root@medo oci8-1.2.2]# service httpd start
Starting httpd:                                            [  OK  ]
[root@medo oci8-1.2.2]#
[root@medo oci8-1.2.2]# ls -l /usr/local/lib/php/extensions/no-debug-non-zts-20050922/
total 288
-rwxr-xr-x  1 root root 287297 Sep 19 21:23 oci8.so
[root@medo oci8-1.2.2]#

Of course, phpinfo will now return the requested information:
OCI8 Support     enabled
Version     1.2.1
Revision     $Revision: $
Active Persistent Connections     0
Active Connections     0
Oracle Version     no value
Compile-time ORACLE_HOME     no value
Libraries Used     no value
Temporary Lob support     enabled
Collections support     enabled

Directive    Local Value    Master Value
oci8.default_prefetch    10    10
oci8.max_persistent    -1    -1
oci8.old_oci_close_semantics    0    0
oci8.persistent_timeout    -1    -1
oci8.ping_interval    60    60
oci8.privileged_connect    Off    Off
oci8.statement_cache_size    20    20

Observe that "Version" string in phpinfo output still shows the version
1.2.1 despite the fact that I downloaded and installed version 1.2.2.
It's just a little innocuous bug, nothing else.

Site Timeline