|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37698 select on a synonym through a database link
Submitted: 2006-06-05 08:17 UTC Modified: 2016-03-08 01:39 UTC
From: james at redeye dot com Assigned:
Status: Not a bug Package: PDO OCI
PHP Version: 5.1.4 OS: Linux Advanced Server 3.4
Private report: No CVE-ID: None
 [2006-06-05 08:17 UTC] james at redeye dot com
I have a synonym in my Oracle 10g database that points to a table on a 9i database. A database link is used to do this.

If I do a select * on this table a segmentation fault is produced in php. If I do the select with a where clause or by specifying the fields I want then PHP works ok

Reproduce code:
select * from segment // Causes segmentation fault

select * from segment where name like '%MR%' // works ok

select name from segment // works ok

Expected result:
returns the matches from the sql.

Actual result:
PHP segmentation fault.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-05 08:44 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

 [2006-06-05 09:42 UTC] james at redeye dot com
#0  0x011e0009 in ttcfopr () from /u01/app/oracle/product/920/lib/
#1  0x011d6341 in ttcdrv () from /u01/app/oracle/product/920/lib/
#2  0x0104636d in nioqwa () from /u01/app/oracle/product/920/lib/
#3  0x00ef9ec0 in upirtrc () from /u01/app/oracle/product/920/lib/
#4  0x00ea294d in kpurcsc () from /u01/app/oracle/product/920/lib/
#5  0x00e62ff9 in kpuexecv8 () from /u01/app/oracle/product/920/lib/
#6  0x00e64abe in kpuexec () from /u01/app/oracle/product/920/lib/
#7  0x00ec3c2c in OCIStmtExecute () from /u01/app/oracle/product/920/lib/
#8  0x080ff70b in oci_stmt_execute (stmt=0x9174a74)
    at /usr/local/src/php-5.1.4/ext/pdo_oci/oci_statement.c:142
#9  0x080f8bc9 in zif_PDOStatement_execute (ht=0, return_value=0x916f6ec, return_value_ptr=0x0, 
    this_ptr=0x916f7d4, return_value_used=0) at /usr/local/src/php-5.1.4/ext/pdo/pdo_stmt.c:451
#10 0x081fc669 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfff8bb0) at zend_vm_execute.h:200
#11 0x081fbf8d in execute (op_array=0x916b394) at zend_vm_execute.h:92
#12 0x00592920 in zend_oe () from /usr/local/Zend/lib/Optimizer-2.6.1/php-5.1.x/
#13 0x0916b394 in ?? ()
#14 0x0090d180 in run_fp () from /lib/tls/
#15 0x00000df0 in ?? ()
#16 0xbfff8c28 in ?? ()
#17 0x00848e9d in malloc () from /lib/tls/
 [2006-06-05 09:49 UTC]
Doesn't seem to be related to PHP..
Please try to rebuild PHP with the latest Oracle Instant Client and see if it helps.
See also bug #36607.
 [2006-06-05 10:02 UTC] james at redeye dot com
Can't use the latest Oracle Instant Client as I use the ssh library and using the Oracle 10g client causes this not to work. It only works with the 9i client.

Using Toad and the Oracle 9i client the query works fine. Using Toad and the Oracle 10g client the query works fine also.
 [2006-06-05 11:05 UTC]
Did you try the patch from the last comment of bug #36607?
 [2006-06-07 07:49 UTC] james at redeye dot com
No patch from bug 36607 did not fix it.
 [2006-06-07 08:02 UTC]
PHP doesn't care if a table is a synonym created using DB Link or not. If your 9i client segfaults when executing queries on 10g server - please report that to Oracle.
Not PHP problem.

 [2016-03-08 01:39 UTC]
-Package: PDO related +Package: PDO OCI
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 23 04:01:29 2024 UTC