PHP not working w/ Oracle (fwd)

From: Date: Thu, 02 Mar 2000 00:54:48 +0000
Subject: PHP not working w/ Oracle (fwd)
Groups: php.dev 
Request: Send a blank email to php-dev+get-16251@lists.php.net to get a copy of this message
Anybody have a clue on this one? I haven't fiddled with Oracle7 for ages. ---------- Forwarded message ---------- Date: Wed, 01 Mar 2000 14:06:38 -0800 From: Ray Clouse <ray.clouse@boeing.com> To: ssb@fast.no, rasmus@lerdorf.on.ca Cc: Heiko Jones <heiko.jones@boeing.com>, Rick Herbel <rick.herbel@boeing.com> Subject: PHP not working w/ Oracle Hiya. Saw your names in the CREDITS file, so I'm hoping you can give us a clue as to what we're doing wrong or what we can do to get past our problem. OK, what we're trying to do is access an Oracle 7.3.6 database on a remote server from Apache & PHP running on a Linux box. We got the fullblown Oracle 8.1.5, installed it, and generated Apache & PHP3 from Apache Kit 5.2. We tested the Oracle stuff using SQLPlus, and we can access the remote database instances just fine. I run Apache (httpd -X) so we can see the error messages. I test it with this PHP3 page: <html> <head> <title>Example</title> </head> <body> <?php echo "Hi, I'm an Oracle PHP script!"; ?> <?php $conn = Ora_Logon("luser@remote", "password"); ?> <?php echo "Here's the connection result: " $conn; ?> </body> </html> Apache segfaults. In php-3.0.15/functions/oracle.c, I've found that the segfault occurs at this line: if (orlon(&db_conn->lda, db_conn->hda, user, strlen(user), pwd, strlen(pwd), 0)) { orlon is a function in libclntsh.so.8.0, for which we cannot find the source. So, I wrote this little program to try to test orlon: #include "oracle.h" #include "ocidfn.h" #include <stdio.h> #define HDA_SIZE 256 typedef struct { int open; Lda_Def lda; ub1 hda[HDA_SIZE]; } oraConnection; int main() { oraConnection *db_conn; db_conn = (oraConnection *)malloc(sizeof(oraConnection)); orlon(&db_conn->lda, db_conn->hda, "luser@remote", strlen("luser@remote"), "password", strlen("password"), 0); } Unfortunately we get an undefined reference: gcc -g -O2 -O2 -I. -I. -I/u01/app/oracle/product/8.1.5/rdbms/demo \ ? -I/u01/app/oracle/product/8.1.5/network/public \ ? -I/u01/app/oracle/product/8.1.5/plsql/public \ ? -o test test.c /tmp/ccX1L2WN.o: In function `main': /home/clouse/spacl/test.c:20: undefined reference to `orlon' collect2: ld returned 1 exit status If either of you have any ideas, please let us know. Thank you. -- ------------------------------------------------------------------------- Ray Clouse | Don't fear the penguins. Engineer Scientist/Specialist | Boeing Expendable Launch Vehicles | Ray.Clouse AT boeing.com Huntington Beach, CA | rclouse AT penguinpowered.com

« previous php.dev (#16251) next »