[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-database
Subject:    php*-oci8 or an alternative ?
From:       Ion-Mihai "IOnut" Tetcu <itetcu () freebsd ! org>
Date:       2006-09-22 23:22:34
Message-ID: 20060923022234.3ce46236 () it ! buh ! tecnik93 ! com
[Download RAW message or body]


Hi,


// 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/oci8.so' - /usr/local/lib/php/20020429/oci8.so: \
Undefined symbol &quot;pthread_kill&quot; in Unknown on line 0

 # objdump -TR /usr/local/lib/php/20020429/oci8.so | 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/oci8.so' - /usr/local/lib/php/20050922/oci8.so: \
Undefined symbol &quot;__h_error&quot; 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/oci8.so
[New LWP 100093]
(gdb) bt
#0  0x48a771eb in ?? () from /usr/local/lib/php/20050922-debug/oci8.so
#1  0x48746b25 in __sigsetjmp () from /usr/local/lib/php/20050922-debug/oci8.so
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


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic