Re: OCI 8 and rowid cause SIGSEGV

From: Date: Fri, 23 Feb 2001 16:03:52 +0000
Subject: Re: OCI 8 and rowid cause SIGSEGV
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6913@lists.php.net to get a copy of this message
I suppose the authors never concieved a replacement parameter for select specification. try: > $sql = "select foo, bar, rid from masterdata WHERE rid=:rid" You need to loose the colon ":" or place it to the right of a where clause. <SVEN.VOIGT@LHSYSTEMS.COM> wrote in message news:F114C0EF28F3D211B7E84000610104461D3D44@XNT-FRALIC-9... > Hi there! > > I am using the following code on SuSE 6.4, Apache 1.3.14 and PHP 4.0.4: > # $sql is dyanmically built, e.g. > > $sql = "select foo, bar, :rid from masterdata"; > > $db = OCILogOn("picht","picht"); > > $stmt = OCIParse($db, $sql); > > $rowid = OCINewDescriptor($db,OCI_D_ROWID); > > OCIBindByName($stmt,":rid",&$rowid,-1,OCI_B_ROWID); > > OCIExecute($stmt); > > What's wrong? Am I missing something or is this a bug? Often a where clause > is used for selects, but that doesn't seem to be the problem. (Can I use > "where $key like '$value'"? I read somewhere not to use quotes on DB > selects). Finally, here's the output from gdb: > > Program received signal SIGSEGV, Segmentation fault. > 0x4067154f in memcpy () at ../sysdeps/generic/memcpy.c:64 > 64 ../sysdeps/generic/memcpy.c: Datei oder Verzeichnis nicht gefunden. > [file not found...] > (gdb) bt > #0 0x4067154f in memcpy () at ../sysdeps/generic/memcpy.c:64 > #1 0x403f3dce in ttcclr () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #2 0x403e1d0c in ttcrd2r () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #3 0x403f58e8 in ttcacs () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #4 0x403e670b in ttcdrv () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #5 0x40315e45 in nioqwa () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #6 0x40241eaa in upirtrc () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #7 0x40221571 in kpurcsc () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #8 0x40276235 in kpuexecv8 () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #9 0x4027798c in kpuexec () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #10 0x4022e4a4 in OCIStmtExecute () from > /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0 > #11 0x80822ed in oci_execute (statement=0x821f4ec, func=0x815cb10 > "OCIExecute", mode=32) at oci8.c:1182 > #12 0x8085a67 in php_if_ociexecute (ht=1, return_value=0x821f634, > this_ptr=0x0, return_value_used=0) at oci8.c:3324 > #13 0x810c60f in execute (op_array=0x821a814) at ./zend_execute.c:1519 > #14 0x80e410b in zend_execute_scripts (type=8, file_count=3) at zend.c:729 > #15 0x807c56b in php_execute_script (primary_file=0xbffff518) at main.c:1221 > #16 0x80f0bdb in apache_php_module_main (r=0x81fbacc, display_source_mode=0) > at sapi_apache.c:89 > #17 0x8079b36 in send_php () > #18 0x8079b76 in send_parsed_php () > #19 0x8117289 in ap_invoke_handler () > #20 0x812c4ff in process_request_internal () > #21 0x812c572 in ap_process_request () > #22 0x8123416 in child_main () > #23 0x81235d5 in make_child () > #24 0x8123756 in startup_children () > #25 0x8123dcd in standalone_main () > #26 0x81245fc in main () > #27 0x40632a5e in __libc_start_main () at ../sysdeps/generic/libc-start.c:93 > > Cheerio, Sven > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#6913) next »