From owner-freebsd-database@FreeBSD.ORG Fri Sep 22 23:22:41 2006 Return-Path: X-Original-To: freebsd-database@freebsd.org Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0EE1916A47B; Fri, 22 Sep 2006 23:22:41 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (it.buh.tecnik93.com [81.196.204.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23D6443D62; Fri, 22 Sep 2006 23:22:37 +0000 (GMT) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id 7613818181; Sat, 23 Sep 2006 02:22:36 +0300 (EEST) Date: Sat, 23 Sep 2006 02:22:34 +0300 From: Ion-Mihai "IOnut" Tetcu To: freebsd-emulation@FreeBSD.org, freebsd-database@freebsd.org Message-ID: <20060923022234.3ce46236@it.buh.tecnik93.com> X-Mailer: Sylpheed-Claws 2.4.0 (GTK+ 2.8.20; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_vkgP/KTaNfqK3z2CkCc/Jxv"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: php*-oci8 or an alternative ? X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2006 23:22:41 -0000 --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--