By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,213 Members | 1,464 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,213 IT Pros & Developers. It's quick & easy.

OCI8 1.2.1

P: n/a
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.

--
http://www.mgogala.com

May 21 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Sat, 20 May 2006 23:49:22 +0000, Mladen Gogala wrote:
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.


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

--
http://www.mgogala.com

May 22 '06 #2

P: n/a
Mladen Gogala <go****@sbcglobal.net> writes:
On Sat, 20 May 2006 23:49:22 +0000, Mladen Gogala wrote:
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.


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


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.

Chris

--
Christopher Jones, Oracle Corporation, Australia.
Email: Ch***************@oracle.com
Blog: http://blogs.oracle.com/opal/
May 30 '06 #3

P: n/a

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.

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

Sep 19 '06 #4

P: n/a
On Tue, 19 Sep 2006 01:15:07 -0400, sims123
<si************@no-mx.forums.yourdomain.com.auwrote:
>Can some one tell me how can I install a new version of oci8 when I
already have php and oci8 installed.
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.
>I also wanted to how to find which oci version do I have.
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:

http://cvs.php.net/viewvc.cgi/pecl/oci8/oci8.c?view=log

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

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 19 '06 #5

P: n/a
On Tue, 19 Sep 2006 01:15:07 -0400, sims123 wrote:
>
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.

-Simmi
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:
phpize
./configure
make
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"
extension=oci8.so

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
package.xml
oci8-1.2.2/CREDITS
oci8-1.2.2/README
oci8-1.2.2/config.m4
oci8-1.2.2/config.w32
oci8-1.2.2/oci8.dsp
oci8-1.2.2/oci8.c
oci8-1.2.2/oci8_interface.c
oci8-1.2.2/oci8_lob.c
oci8-1.2.2/oci8_statement.c
oci8-1.2.2/oci8_collection.c
oci8-1.2.2/php_oci8.h
........
oci8-1.2.2/tests/skipif.inc
oci8-1.2.2/tests/statement_cache.phpt
oci8-1.2.2/tests/statement_type_old.phpt
oci8-1.2.2/tests/statement_type.phpt
oci8-1.2.2/tests/uncommitted.phpt
$
$ 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:
/tmp/oci8-1.2.2/modules

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
Password:
[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
OCI8 Support enabled
Version 1.2.1
Revision $Revision: 1.269.2.16.2.21 $
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.

Sep 20 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.