Date: Sat, 23 Sep 2006 02:22:34 +0300 From: Ion-Mihai "IOnut" Tetcu <itetcu@FreeBSD.org> To: freebsd-emulation@FreeBSD.org, freebsd-database@freebsd.org Subject: php*-oci8 or an alternative ? Message-ID: <20060923022234.3ce46236@it.buh.tecnik93.com>
next in thread | raw e-mail | index | archive | help
--Sig_vkgP/KTaNfqK3z2CkCc/Jxv Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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/libpt= hread; 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 = "pthread_kill" 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/p= hp/20050922/oci8.so' - /usr/local/lib/php/20050922/oci8.so: Undefined symbo= l "__h_error" in Unknown on line 0 On my 6-STABLE: > php -r '$conn =3D 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/oci= 8.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, --=20 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 --Sig_vkgP/KTaNfqK3z2CkCc/Jxv Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFFHA7BX6fi0k6KXsRArXqAJ9MSDUCRQ4t8yUuOGxgk4Cv96H1pQCaA+1Z f2kKis2cImfB7i6SQYYnUSc= =YLxG -----END PGP SIGNATURE----- --Sig_vkgP/KTaNfqK3z2CkCc/Jxv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060923022234.3ce46236>