php*-oci8 or an alternative ?

Ion-Mihai IOnut Tetcu itetcu at
Fri Sep 22 16:22:41 PDT 2006


// Background info: I'm migrating a site from a Linux shop.

I have an working installation (soon to be a port) of Oracle 10g XE on
my 6-STABLE box.

I need some way to connect to it from php. Ideally (since the site it's
already done and runs OK on Linux) I should use: php4 + php-oci +
ZendAccelerator + Smarty + pear-*

I'm already behind the schedule. I don't really care if I have to
switch to php5 to use oci8 or whatever (even if this means I have to
write some wrapper functions in php); I wouldn't object right now to
run everything under linuxulator, provided it works.

1. Trying to apply the same trick from php5-oci8 port to make a
php4-oci8 port:
        for lib in ${LOCALBASE}/oracle8-client/lib/libclntsh /usr/lib/libpthread; do \
                /usr/bin/ar x $${lib}.a; \
        done; \
        /usr/bin/ar rcs liboci8.a *.o
results, at run-time in:
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/' - /usr/local/lib/php/20020429/ Undefined symbol "pthread_kill" in Unknown on line 0

 # objdump -TR /usr/local/lib/php/20020429/ | grep pthread_kill
00000000      D  *UND*  00000000 pthread_kill
0040d00c R_386_PC32        pthread_kill
004fb188 R_386_JUMP_SLOT   pthread_kill

2. php5-oci8 port doesn't work:

On a FreeBSD 7.0-CURRENT #1: Thu Oct 12 15:41:06 EEST 2006  box:
 > php
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/' - /usr/local/lib/php/20050922/ Undefined symbol "__h_error" in Unknown on line 0

On my 6-STABLE:

 > php -r '$conn = oci_connect("hr", "hr", "//localhost/XE");'
Segmentation fault (core dumped)
 > gdb php php.core
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault
#0  0x48a771eb in ?? () from /usr/local/lib/php/20050922-debug/
[New LWP 100093]
(gdb) bt
#0  0x48a771eb in ?? () from /usr/local/lib/php/20050922-debug/
#1  0x48746b25 in __sigsetjmp () from /usr/local/lib/php/20050922-debug/
Previous frame inner to this frame (corrupt stack?)

Same if using databases/pecl-PDO_OCI. Same for php-cli or when running
from a threaded apache22.

So ... does php5-oci work for you ? If so, could you please share your
configuration ? (uname -a, php config, apache config, ...).

Many thanks for your help,

IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #198:
Post-it Note Sludge leaked into the monitor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-emulation mailing list