php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48410 Using database link throws unrecognized date warning
Submitted: 2009-05-27 23:00 UTC Modified: 2009-05-28 18:47 UTC
From: krastin dot georgiev at gmail dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.2.9 OS: Linux (ALL)
Private report: No CVE-ID: None
 [2009-05-27 23:00 UTC] krastin dot georgiev at gmail dot com
Description:
------------
When doing a call across a database link Oracle throws a warning immediately.

Compiled using different versions of Oracle instant client and OCI versions.

Instant Client versions:
10.2.0.3
10.2.0.4
11.1.0.7.0

OCI versions:
1.2.5
1.3.4
1.3.5

It is important to note that using 1.2.5 on Windows (precompiled) does NOT cause this warning. This is only a problem under Linux.

Reproduce code:
---------------
<?php

$conn = OCILogon("user", "pass", "//192.168.100.15/mysid");

$sql = 'SELECT * FROM DYN_AUDIT_REP@REMOTEDB';
$stmt = oci_parse($conn, $sql);
$res = oci_execute($stmt);

if(is_array($res)) {
	while ($r = oci_fetch_assoc($res)) { 
		print_r($r);
		echo "<br>";
	}
}	// end if

OCILogoff($conn);

?>

Expected result:
----------------
Warning: oci_execute() [function.oci-execute]: ORA-01821: date format not recognized ORA-02063: preceding line from MUREXDM in /home/myself/proc.php on line 7



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-27 23:07 UTC] krastin dot georgiev at gmail dot com
As sample a table named TY can be created with the following two columns:

TY_ID	INTEGER		
TY_NM	VARCHAR2(4000)

Querying this table across a link will cause the warning.
 [2009-05-28 18:47 UTC] sixd@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

-------------

The error message is from the communication between the source and destination databases of the DB link, so PHP OCI8 is unlikely to be the issue.

Check the query in SQL*Plus (make sure SQL*Plus use the same Oracle environment settings as the Apache/PHP process).

Check the ORA_NLSxx environment variables in effect for the shells starting the DBs were correct.  See metalink.oracle.com Note 236320.1 and Note 338832.1

Before updating this bug, follow up on an Oracle-specific forum or with Oracle Support.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 12:01:29 2024 UTC